-
Notifications
You must be signed in to change notification settings - Fork 14.9k
dfsan: Fix test with gcc 15. #153873
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
dfsan: Fix test with gcc 15. #153873
Conversation
Created using spr 1.3.6-beta.1
@llvm/pr-subscribers-compiler-rt-sanitizer Author: Peter Collingbourne (pcc) ChangesWith gcc 15 we end up emitting a reference to the This reference is undefined with dfsan causing the test to fail. Fix it Full diff: https://github.com/llvm/llvm-project/pull/153873.diff 1 Files Affected:
diff --git a/compiler-rt/test/dfsan/atomic.cpp b/compiler-rt/test/dfsan/atomic.cpp
index 22ee323c752f8..73e1cbd17a7cd 100644
--- a/compiler-rt/test/dfsan/atomic.cpp
+++ b/compiler-rt/test/dfsan/atomic.cpp
@@ -1,9 +1,12 @@
-// RUN: %clangxx_dfsan %s -fno-exceptions -o %t && %run %t
-// RUN: %clangxx_dfsan -DORIGIN_TRACKING -mllvm -dfsan-track-origins=1 %s -fno-exceptions -o %t && %run %t
+// RUN: %clangxx_dfsan %s -fno-exceptions -D_GLIBCXX_NO_ASSERTIONS -o %t && %run %t
+// RUN: %clangxx_dfsan -DORIGIN_TRACKING -mllvm -dfsan-track-origins=1 %s -fno-exceptions -D_GLIBCXX_NO_ASSERTIONS -o %t && %run %t
//
// Use -fno-exceptions to turn off exceptions to avoid instrumenting
// __cxa_begin_catch, std::terminate and __gxx_personality_v0.
//
+// Use -D_GLIBCXX_NO_ASSERTIONS to avoid depending on
+// std::__glibcxx_assert_fail with gcc >= 15.
+//
// TODO: Support builtin atomics. For example, https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html
// DFSan instrumentation pass cannot identify builtin callsites yet.
|
With gcc 15 we end up emitting a reference to the std::__glibcxx_assert_fail function because of this change: gcc-mirror/gcc@361d230 combined with assertion checks in the std::atomic implementation. This reference is undefined with dfsan causing the test to fail. Fix it by defining the macro that disables assertions. Pull Request: #153873
Landed manually |
With gcc 15 we end up emitting a reference to the std::__glibcxx_assert_fail function because of this change: gcc-mirror/gcc@361d230 combined with assertion checks in the std::atomic implementation. This reference is undefined with dfsan causing the test to fail. Fix it by defining the macro that disables assertions. Pull Request: llvm/llvm-project#153873
With gcc 15 we end up emitting a reference to the std::__glibcxx_assert_fail function because of this change: gcc-mirror/gcc@361d230 combined with assertion checks in the std::atomic implementation. This reference is undefined with dfsan causing the test to fail. Fix it by defining the macro that disables assertions. Pull Request: llvm#153873
With gcc 15 we end up emitting a reference to the std::__glibcxx_assert_fail function because of this change: gcc-mirror/gcc@361d230 combined with assertion checks in the std::atomic implementation. This reference is undefined with dfsan causing the test to fail. Fix it by defining the macro that disables assertions. Pull Request: #153873
With gcc 15 we end up emitting a reference to the
std::__glibcxx_assert_fail function because of this change:
gcc-mirror/gcc@361d230
combined with assertion checks in the std::atomic implementation.
This reference is undefined with dfsan causing the test to fail. Fix it
by defining the macro that disables assertions.