-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[libc++][hardening] XFAIL test in fast mode under HWASAN #78862
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
[libc++][hardening] XFAIL test in fast mode under HWASAN #78862
Conversation
Created using spr 1.3.4
@llvm/pr-subscribers-libcxx Author: Vitaly Buka (vitalybuka) ChangesFAST mode uses TRAP, and HWASAN replaces TRAP Full diff: https://github.com/llvm/llvm-project/pull/78862.diff 3 Files Affected:
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 a91ba041763749..23ef20d4e07819 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 f78d5d70e58904..c3cdfa926c6cc8 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 27542ee32bef94..854bf6c5da9cd6 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>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for fixing this!
I didn't actually tested and expected to merge after https://lab.llvm.org/buildbot/#/builders/236/builds/8872 |
Follow up to #78862 These tests control hardening mode with `ADDITIONAL_COMPILE_FLAGS`, and always set modes which use on TRAP. So we don't need to check `libcpp-hardening-mode=fast`, and they must always fail with the current HWASAN implementation.
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 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.