Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip MemtagBasicDeathTest#Unsupported when running with HWASan #84243

Conversation

fmayer
Copy link
Contributor

@fmayer fmayer commented Mar 6, 2024

Tested in AOSP.

Created using spr 1.3.4
@llvmbot
Copy link
Collaborator

llvmbot commented Mar 6, 2024

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Florian Mayer (fmayer)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/84243.diff

1 Files Affected:

  • (modified) compiler-rt/lib/scudo/standalone/tests/memtag_test.cpp (+5)
diff --git a/compiler-rt/lib/scudo/standalone/tests/memtag_test.cpp b/compiler-rt/lib/scudo/standalone/tests/memtag_test.cpp
index fd277f962a9aaa..37a18858e67c2c 100644
--- a/compiler-rt/lib/scudo/standalone/tests/memtag_test.cpp
+++ b/compiler-rt/lib/scudo/standalone/tests/memtag_test.cpp
@@ -12,12 +12,17 @@
 #include "platform.h"
 #include "tests/scudo_unit_test.h"
 
+extern "C" void __hwasan_init() __attribute__((weak));
+
 #if SCUDO_LINUX
 namespace scudo {
 
 TEST(MemtagBasicDeathTest, Unsupported) {
   if (archSupportsMemoryTagging())
     GTEST_SKIP();
+  // Skip when running with HWASan.
+  if (&__hwasan_init != 0)
+    GTEST_SKIP();
 
   EXPECT_DEATH(archMemoryTagGranuleSize(), "not supported");
   EXPECT_DEATH(untagPointer((uptr)0), "not supported");

@fmayer fmayer requested review from pcc and eugenis and removed request for pcc March 6, 2024 22:40
@eugenis
Copy link
Contributor

eugenis commented Mar 8, 2024

LGTM

@fmayer fmayer merged commit 1cf428a into main Mar 8, 2024
8 checks passed
@fmayer fmayer deleted the users/fmayer/sprskip-memtagbasicdeathtestunsupported-when-running-with-hwasan branch March 8, 2024 21:46
fmayer added a commit to fmayer/llvm-project that referenced this pull request Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants