Skip to content

Commit aaa7de1

Browse files
authored
[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.
1 parent 2fc2ee1 commit aaa7de1

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

libcxx/test/libcxx/assertions/modes/enabling_assertions_enables_extensive_mode.pass.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
// The ability to set a custom abort message is required to compare the assertion message (which only happens in the
1616
// debug mode).
1717
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
18+
// HWASAN replaces TRAP with abort or error exit code.
19+
// XFAIL: libcpp-hardening-mode=fast && hwasan
1820
// Note that GCC doesn't support `-Wno-macro-redefined`.
1921
// ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_HARDENING_MODE -D_LIBCPP_ENABLE_ASSERTIONS=1
2022

libcxx/test/libcxx/assertions/modes/override_with_extensive_mode.pass.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
// The ability to set a custom abort message is required to compare the assertion message (which only happens in the
1414
// debug mode).
1515
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
16+
// HWASAN replaces TRAP with abort or error exit code.
17+
// XFAIL: libcpp-hardening-mode=fast && hwasan
1618
// ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE
1719

1820
#include <cassert>

libcxx/test/libcxx/assertions/modes/override_with_fast_mode.pass.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
// The ability to set a custom abort message is required to compare the assertion message (which only happens in the
1414
// debug mode).
1515
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
16+
// HWASAN replaces TRAP with abort or error exit code.
17+
// XFAIL: libcpp-hardening-mode=fast && hwasan
1618
// ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST
1719

1820
#include <cassert>

0 commit comments

Comments
 (0)