compiler-explorer
compiler-explorer copied to clipboard
[BUG]: Thread Sanitizer doesn't work
Describe the bug
TSan fails for (all?) gcc versions with
program returned: 66
Program stderr
FATAL: ThreadSanitizer: unexpected memory mapping 0x711993472000-0x711993900000
Likely due to https://github.com/google/sanitizers/issues/1716
Steps to reproduce
- Write a hello world app
- Compile with any gcc with -fsanitize=thread
Expected behavior
TSan works
Reproduction link
https://godbolt.org/z/oedPr11qc
Screenshots
Not applicable
Operating System
Ubuntu 22.04
Browser version
Google Chrome 126.0.6478.126
As of end of April 2025, the problem still persists so : where are we on this ?
The current solution is to change the amount of memory address randomization with :
sudo sysctl vm.mmap_rnd_bits=30
so it could be nice to provide a way to do this if doable / possible (?)