[compiler-rt] Skip MemtagBasicDeathTest#Unsupported when running with HWASan (PR #84243)
Florian Mayer via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 6 14:19:37 PST 2024
https://github.com/fmayer created https://github.com/llvm/llvm-project/pull/84243
None
>From d7e7fae5fef3b6247027ed1245573a774e8ceeeb Mon Sep 17 00:00:00 2001
From: Florian Mayer <fmayer at google.com>
Date: Wed, 6 Mar 2024 14:19:25 -0800
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
=?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Created using spr 1.3.4
---
compiler-rt/lib/scudo/standalone/tests/memtag_test.cpp | 5 +++++
1 file changed, 5 insertions(+)
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");
More information about the llvm-commits
mailing list