Open
Description
When using the example code simple_race.cc, enabling the -static parameter will cause the code to segfault
➜ DataRaceTest clang++ simple_race.cc -fsanitize=thread -fPIE -g -static -o simple_race_static
➜ DataRaceTest ./simple_race_static
[1] 4011847 segmentation fault (core dumped) ./simple_race_static
➜ DataRaceTest clang++ simple_race.cc -fsanitize=thread -fPIE -g -o simple_race_static
➜ DataRaceTest ./simple_race_static
==================
WARNING: ThreadSanitizer: data race (pid=4012114)
.................
==================
ThreadSanitizer: reported 1 warnings
Suggested modification: Add code similar to ASan
➜ DataRaceTest clang++ simple_race.cc -fsanitize=address -fPIE -g -static -o simple_race_static
........
`__asan::AsanDoesNotSupportStaticLinkage()':
.........