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 <iostream>
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.
0x00007ffff71a9824 in TraceAddEvent (addr=addr@entry=140737339075753,
typ=__tsan::EventTypeFuncEnter, fs=..., thr=thr@entry=0x7ffff6f2c880) at
../../../../gcc-5.2.0/libsanitizer/tsan/tsan_rtl.h:723
723       *evp = ev;
(gdb) bt
#0  0x00007ffff71a9824 in TraceAddEvent (addr=addr@entry=140737339075753,
typ=__tsan::EventTypeFuncEnter, fs=..., thr=thr@entry=0x7ffff6f2c880) at
../../../../gcc-5.2.0/libsanitizer/tsan/tsan_rtl.h:723
#1  __tsan::FuncEntry (thr=thr@entry=0x7ffff6f2c880,
pc=pc@entry=140737339075753) at
../../../../gcc-5.2.0/libsanitizer/tsan/tsan_rtl.cc:913
#2  0x00007ffff7161bf3 in ScopedInterceptor::ScopedInterceptor
(this=0x7fffffffdef0, thr=0x7ffff6f2c880, fname=<optimized out>,
pc=140737339075753) at
../../../../gcc-5.2.0/libsanitizer/tsan/tsan_interceptors.cc:191
#3  0x00007ffff7175b52 in __interceptor___tls_get_addr (arg=0x7ffff71feb98) at
../../../../gcc-5.2.0/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:3871
#4  0x00007ffff71a2ca9 in ScopedIgnoreInterceptors (this=<synthetic pointer>)
at ../../../../gcc-5.2.0/libsanitizer/tsan/tsan_rtl.h:483
#5  __tsan::Initialize (thr=thr@entry=0x7ffff6f2c880) at
../../../../gcc-5.2.0/libsanitizer/tsan/tsan_rtl.cc:302
#6  0x00007ffff7161be8 in ScopedInterceptor::ScopedInterceptor
(this=0x7fffffffdfd0, thr=0x7ffff6f2c880, fname=<optimized out>,
pc=140737337642886) at
../../../../gcc-5.2.0/libsanitizer/tsan/tsan_interceptors.cc:190
#7  0x00007ffff71620ee in __interceptor___cxa_atexit (f=f@entry=0x7ffff7046570
<std::(anonymous
namespace)::generic_error_category::~generic_error_category()>,
arg=arg@entry=0x7ffff7135510 <std::(anonymous
namespace)::generic_category_instance>, 
    dso=0x7ffff71351c0) at
../../../../gcc-5.2.0/libsanitizer/tsan/tsan_interceptors.cc:321
#8  0x00007ffff7044f86 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 0x000000342f00e66f in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2
#11 0x000000342f000b3a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#12 0x0000000000000001 in ?? ()
#13 0x00007fffffffe37a in ?? ()
#14 0x0000000000000000 in ?? ()

Reply via email to