[libcxx-commits] [libcxx] aaa7de1 - [libc++][hardening] XFAIL test in fast mode under HWASAN (#78862)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Jan 20 13:37:42 PST 2024
Author: Vitaly Buka
Date: 2024-01-20T13:37:38-08:00
New Revision: aaa7de1fc9255f489e760c3449efde9c07ddb1cb
URL: https://github.com/llvm/llvm-project/commit/aaa7de1fc9255f489e760c3449efde9c07ddb1cb
DIFF: https://github.com/llvm/llvm-project/commit/aaa7de1fc9255f489e760c3449efde9c07ddb1cb.diff
LOG: [libc++][hardening] XFAIL test in fast mode under HWASAN (#78862)
After #77883, `fast` mode uses TRAP, and HWASAN
replaces TRAP with abort or error exit code.
On a quick looks it should be possible to avoid doing
that in HWASAN, but historically this is convention for all
sanitizers. Changing this behavior may break existing
users.
Other sanitizers are not affected because they don't
install TRAP handlers by default. But if they do, they also
replace TRAP with abort/exit.
Added:
Modified:
libcxx/test/libcxx/assertions/modes/enabling_assertions_enables_extensive_mode.pass.cpp
libcxx/test/libcxx/assertions/modes/override_with_extensive_mode.pass.cpp
libcxx/test/libcxx/assertions/modes/override_with_fast_mode.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/libcxx/assertions/modes/enabling_assertions_enables_extensive_mode.pass.cpp b/libcxx/test/libcxx/assertions/modes/enabling_assertions_enables_extensive_mode.pass.cpp
index a91ba0417637496..23ef20d4e07819c 100644
--- a/libcxx/test/libcxx/assertions/modes/enabling_assertions_enables_extensive_mode.pass.cpp
+++ b/libcxx/test/libcxx/assertions/modes/enabling_assertions_enables_extensive_mode.pass.cpp
@@ -15,6 +15,8 @@
// The ability to set a custom abort message is required to compare the assertion message (which only happens in the
// debug mode).
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// HWASAN replaces TRAP with abort or error exit code.
+// XFAIL: libcpp-hardening-mode=fast && hwasan
// Note that GCC doesn't support `-Wno-macro-redefined`.
// ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_HARDENING_MODE -D_LIBCPP_ENABLE_ASSERTIONS=1
diff --git a/libcxx/test/libcxx/assertions/modes/override_with_extensive_mode.pass.cpp b/libcxx/test/libcxx/assertions/modes/override_with_extensive_mode.pass.cpp
index f78d5d70e58904a..c3cdfa926c6cc82 100644
--- a/libcxx/test/libcxx/assertions/modes/override_with_extensive_mode.pass.cpp
+++ b/libcxx/test/libcxx/assertions/modes/override_with_extensive_mode.pass.cpp
@@ -13,6 +13,8 @@
// The ability to set a custom abort message is required to compare the assertion message (which only happens in the
// debug mode).
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// HWASAN replaces TRAP with abort or error exit code.
+// XFAIL: libcpp-hardening-mode=fast && hwasan
// ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE
#include <cassert>
diff --git a/libcxx/test/libcxx/assertions/modes/override_with_fast_mode.pass.cpp b/libcxx/test/libcxx/assertions/modes/override_with_fast_mode.pass.cpp
index 27542ee32bef942..854bf6c5da9cd60 100644
--- a/libcxx/test/libcxx/assertions/modes/override_with_fast_mode.pass.cpp
+++ b/libcxx/test/libcxx/assertions/modes/override_with_fast_mode.pass.cpp
@@ -13,6 +13,8 @@
// The ability to set a custom abort message is required to compare the assertion message (which only happens in the
// debug mode).
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
+// HWASAN replaces TRAP with abort or error exit code.
+// XFAIL: libcpp-hardening-mode=fast && hwasan
// ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST
#include <cassert>
More information about the libcxx-commits
mailing list