[clang] [compiler-rt] [llvm] [CMake][compiler-rt] Support for using compiler-rt atomic library (PR #106603)
Chris Apple via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 30 06:24:25 PDT 2024
cjappl wrote:
> I'm seeing a test failure but I'm not sure if it's an issue with RTSan or compiler-rt atomic implementation:
Interesting, so that test basically tests that large atomics that insert locks under the hood die as expected. Zooming in on the second part of the test:
```
std::atomic<std::array<float, 2048>> large_atomic;
ASSERT_FALSE(large_atomic.is_lock_free()); ///// HERE IS INTERESTING!
auto Func = [&]() {
std::array<float, 2048> x = large_atomic.load();
return x;
};
ExpectRealtimeDeath(Func);
ExpectNonRealtimeSurvival(Func);
```
It seems like the compiler-rt version says it is lock free, but then we aren't dying. Does it take another lock, different from a pthread_mutex_lock? Those are the locks we look for in our implementation.
https://github.com/llvm/llvm-project/pull/106603
More information about the cfe-commits
mailing list