Skip to content

[libc++][hardening] XFAIL tests with HWASAN #78866

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

Merged

Conversation

vitalybuka
Copy link
Collaborator

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.

Created using spr 1.3.4
@vitalybuka vitalybuka requested a review from a team as a code owner January 21, 2024 00:26
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Jan 21, 2024
@vitalybuka vitalybuka requested a review from var-const January 21, 2024 00:26
@llvmbot
Copy link
Member

llvmbot commented Jan 21, 2024

@llvm/pr-subscribers-libcxx

Author: Vitaly Buka (vitalybuka)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/78866.diff

3 Files Affected:

  • (modified) libcxx/test/libcxx/assertions/modes/enabling_assertions_enables_extensive_mode.pass.cpp (+1-1)
  • (modified) libcxx/test/libcxx/assertions/modes/override_with_extensive_mode.pass.cpp (+1-1)
  • (modified) libcxx/test/libcxx/assertions/modes/override_with_fast_mode.pass.cpp (+1-1)
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 23ef20d4e07819..11e8ae228f8c87 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
@@ -16,7 +16,7 @@
 // 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
+// XFAIL: 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 c3cdfa926c6cc8..cf662e9eadf7af 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
@@ -14,7 +14,7 @@
 // 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
+// XFAIL: 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 854bf6c5da9cd6..0989ad39a78ea4 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
@@ -14,7 +14,7 @@
 // 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
+// XFAIL: hwasan
 // ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST
 
 #include <cassert>

@vitalybuka
Copy link
Collaborator Author

vitalybuka commented Jan 21, 2024

This will work, I tested on the bot.

@var-const var-const added the hardening Issues related to the hardening effort label Jan 21, 2024
@var-const
Copy link
Member

var-const commented Jan 21, 2024

Thank you!

@var-const var-const merged commit f0c920f into main Jan 21, 2024
@var-const var-const deleted the users/vitalybuka/spr/libchardening-xfail-tests-with-hwasan branch January 21, 2024 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hardening Issues related to the hardening effort libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants