Skip to content

Commit 1cf428a

Browse files
authored
Skip MemtagBasicDeathTest#Unsupported when running with HWASan (#84243)
Tested in AOSP.
1 parent 3ceebcb commit 1cf428a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler-rt/lib/scudo/standalone/tests/memtag_test.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,17 @@
1212
#include "platform.h"
1313
#include "tests/scudo_unit_test.h"
1414

15+
extern "C" void __hwasan_init() __attribute__((weak));
16+
1517
#if SCUDO_LINUX
1618
namespace scudo {
1719

1820
TEST(MemtagBasicDeathTest, Unsupported) {
1921
if (archSupportsMemoryTagging())
2022
GTEST_SKIP();
23+
// Skip when running with HWASan.
24+
if (&__hwasan_init != 0)
25+
GTEST_SKIP();
2126

2227
EXPECT_DEATH(archMemoryTagGranuleSize(), "not supported");
2328
EXPECT_DEATH(untagPointer((uptr)0), "not supported");

0 commit comments

Comments
 (0)