https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65112
guillaume.sabouret at starqube dot com changed:
What|Removed |Added
CC||guillaume.sabouret@starqube
||.com
--- Comment #4 from guillaume.sabouret at starqube dot com ---
Oddly enough, I have the exact same problem in C++ (RHEL 6, gcc 5.2.0 compiled
from sources, using download_prerequisites for prerequisites and
--enable-languages=c,c++ --enable-lto as parameters to the configure script).
I have not been able to use TSAN since gcc 4.9.2. on our code base. It does
crash every time for even the simplest of programs (see below). I'd be curious
to know if somebody can reproduce it.
If I creste hello.cpp as
#include
int main(){std::cout << "hello world!\n";return 0;}
and if I compile it as
g++-5.2.0 -fsanitize=thread hello.cpp
then running it gives a segmentation fault (stack looks a lot like the one
submitted here)
Program received signal SIGSEGV, Segmentation fault.
0x771a9824 in TraceAddEvent (addr=addr@entry=140737339075753,
typ=__tsan::EventTypeFuncEnter, fs=..., thr=thr@entry=0x76f2c880) at
../../../../gcc-5.2.0/libsanitizer/tsan/tsan_rtl.h:723
723 *evp = ev;
(gdb) bt
#0 0x771a9824 in TraceAddEvent (addr=addr@entry=140737339075753,
typ=__tsan::EventTypeFuncEnter, fs=..., thr=thr@entry=0x76f2c880) at
../../../../gcc-5.2.0/libsanitizer/tsan/tsan_rtl.h:723
#1 __tsan::FuncEntry (thr=thr@entry=0x76f2c880,
pc=pc@entry=140737339075753) at
../../../../gcc-5.2.0/libsanitizer/tsan/tsan_rtl.cc:913
#2 0x77161bf3 in ScopedInterceptor::ScopedInterceptor
(this=0x7fffdef0, thr=0x76f2c880, fname=,
pc=140737339075753) at
../../../../gcc-5.2.0/libsanitizer/tsan/tsan_interceptors.cc:191
#3 0x77175b52 in __interceptor___tls_get_addr (arg=0x771feb98) at
../../../../gcc-5.2.0/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:3871
#4 0x771a2ca9 in ScopedIgnoreInterceptors (this=)
at ../../../../gcc-5.2.0/libsanitizer/tsan/tsan_rtl.h:483
#5 __tsan::Initialize (thr=thr@entry=0x76f2c880) at
../../../../gcc-5.2.0/libsanitizer/tsan/tsan_rtl.cc:302
#6 0x77161be8 in ScopedInterceptor::ScopedInterceptor
(this=0x7fffdfd0, thr=0x76f2c880, fname=,
pc=140737337642886) at
../../../../gcc-5.2.0/libsanitizer/tsan/tsan_interceptors.cc:190
#7 0x771620ee in __interceptor___cxa_atexit (f=f@entry=0x77046570
,
arg=arg@entry=0x77135510 ,
dso=0x771351c0) at
../../../../gcc-5.2.0/libsanitizer/tsan/tsan_interceptors.cc:321
#8 0x77044f86 in __static_initialization_and_destruction_0
(__initialize_p=1, __priority=65535) at
../../../../gcc-5.2.0/libstdc++-v3/src/c++11/compatibility-c++0x.cc:214
#9 _GLOBAL__sub_I_compatibility_c__0x.cc(void) () at
../../../../gcc-5.2.0/libstdc++-v3/src/c++11/compatibility-c++0x.cc:257
#10 0x00342f00e66f in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2
#11 0x00342f000b3a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#12 0x0001 in ?? ()
#13 0x7fffe37a in ?? ()
#14 0x in ?? ()