Skip to content

Commit 6beb6f3

Browse files
committed
dfsan: Fix test with gcc 15.
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
1 parent 19cfc30 commit 6beb6f3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

compiler-rt/test/dfsan/atomic.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
// RUN: %clangxx_dfsan %s -fno-exceptions -o %t && %run %t
2-
// RUN: %clangxx_dfsan -DORIGIN_TRACKING -mllvm -dfsan-track-origins=1 %s -fno-exceptions -o %t && %run %t
1+
// RUN: %clangxx_dfsan %s -fno-exceptions -D_GLIBCXX_NO_ASSERTIONS -o %t && %run %t
2+
// RUN: %clangxx_dfsan -DORIGIN_TRACKING -mllvm -dfsan-track-origins=1 %s -fno-exceptions -D_GLIBCXX_NO_ASSERTIONS -o %t && %run %t
33
//
44
// Use -fno-exceptions to turn off exceptions to avoid instrumenting
55
// __cxa_begin_catch, std::terminate and __gxx_personality_v0.
66
//
7+
// Use -D_GLIBCXX_NO_ASSERTIONS to avoid depending on
8+
// std::__glibcxx_assert_fail with gcc >= 15.
9+
//
710
// TODO: Support builtin atomics. For example, https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html
811
// DFSan instrumentation pass cannot identify builtin callsites yet.
912

0 commit comments

Comments
 (0)