[Bug sanitizer/78294] -fsanitize=thread broken

trippels at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Nov 11 18:57:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78294

--- Comment #7 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Disassembly of libtsan.so.0.0.0:

000000000006efd0 <_ZN6__tsan10InitializeEPNS_11ThreadStateE>:                   
  if (is_initialized)                                                           
   6efd0:       80 3d f5 8f 27 00 00    cmpb   $0x0,0x278ff5(%rip)        #
2e7fcc <_ZZN6__tsan10InitializeEPNS_11ThreadStateEE14is_initialized>            
   6efd7:       74 07                   je     6efe0
<_ZN6__tsan10InitializeEPNS_11ThreadStateE+0x10>                                
   6efd9:       f3 c3                   repz retq                               
   6efdb:       0f 1f 44 00 00          nopl   0x0(%rax,%rax,1)                 
void Initialize(ThreadState *thr) {                                             
   6efe0:       41 57                   push   %r15                             
   6efe2:       41 56                   push   %r14                             
   6efe4:       41 55                   push   %r13                             
   6efe6:       41 54                   push   %r12                             
   6efe8:       55                      push   %rbp                             
   6efe9:       53                      push   %rbx                             
   6efea:       48 83 ec 48             sub    $0x48,%rsp                       
  is_initialized = true;                                                        
   6efee:       c6 05 d7 8f 27 00 01    movb   $0x1,0x278fd7(%rip)        #
2e7fcc <_ZZN6__tsan10InitializeEPNS_11ThreadStateEE14is_initialized>            
   6eff5:       48 89 7c 24 18          mov    %rdi,0x18(%rsp)                  
   6effa:       66 48 8d 3d 66 cf 06    data16 lea 0x6cf66(%rip),%rdi        #
dbf68 <_ZN6__tsan22cur_thread_placeholderE@@Base+0xdbf28>                       
   6f001:       00                                                              
    cur_thread()->ignore_interceptors++;                                        
   6f002:       66 66 48 e8 16 3d fb    data16 data16 callq 22d20
<__tls_get_addr@plt>                                                            
   6f009:       ff                                                              
  SetCheckFailedCallback(TsanCheckFailed);                                      
   6f00a:       48 8d 3d 6f ce 00 00    lea    0xce6f(%rip),%rdi        # 7be80
<_ZN6__tsan15TsanCheckFailedEPKciS1_yy>                                         
  SanitizerToolName = "ThreadSanitizer";                                        
   6f011:       48 8d 0d 3b df 03 00    lea    0x3df3b(%rip),%rcx        #
acf53 <_fini+0x35ab> 

vs.

000000000006d3e0 <_ZN6__tsan10InitializeEPNS_11ThreadStateE>:                   
  if (is_initialized)                                                           
   6d3e0:       80 3d 65 7a 47 00 00    cmpb   $0x0,0x477a65(%rip)        #
4e4e4c <_ZZN6__tsan10InitializeEPNS_11ThreadStateEE14is_initialized>            
   6d3e7:       74 07                   je     6d3f0
<_ZN6__tsan10InitializeEPNS_11ThreadStateE+0x10>                                
   6d3e9:       f3 c3                   repz retq                               
   6d3eb:       0f 1f 44 00 00          nopl   0x0(%rax,%rax,1)                 
void Initialize(ThreadState *thr) {                                             
   6d3f0:       41 57                   push   %r15                             
   6d3f2:       41 56                   push   %r14                             
   6d3f4:       41 55                   push   %r13                             
   6d3f6:       41 54                   push   %r12                             
   6d3f8:       55                      push   %rbp                             
   6d3f9:       53                      push   %rbx                             
   6d3fa:       48 83 ec 48             sub    $0x48,%rsp                       
  is_initialized = true;                                                        
   6d3fe:       c6 05 47 7a 47 00 01    movb   $0x1,0x477a47(%rip)        #
4e4e4c <_ZZN6__tsan10InitializeEPNS_11ThreadStateEE14is_initialized>            
   6d405:       48 89 7c 24 18          mov    %rdi,0x18(%rsp)                  
   6d40a:       64 48 8b 04 25 00 00    mov    %fs:0x0,%rax                     
   6d411:       00 00                                                           
    cur_thread()->ignore_interceptors++;                                        
   6d413:       48 03 05 be a7 26 00    add    0x26a7be(%rip),%rax        #
2d7bd8 <.got+0x7c0>                                                             
  SetCheckFailedCallback(TsanCheckFailed);                                      
   6d41a:       48 8d 3d 6f ce 00 00    lea    0xce6f(%rip),%rdi        # 7a290
<_ZN6__tsan15TsanCheckFailedEPKciS1_yy>                                         
  SanitizerToolName = "ThreadSanitizer";                                        
   6d421:       48 8d 0d 64 09 04 00    lea    0x40964(%rip),%rcx        #
add8c <_ZN6__tsan8MutexSet8kMaxSizeE+0x1034>                                    
   6d428:       83 80 98 02 02 00 01    addl   $0x1,0x20298(%rax)               
   6d42f:       48 8d 05 22 df 26 00    lea    0x26df22(%rip),%rax        #
2db358 <_ZN11__sanitizer17SanitizerToolNameE>                                   
   6d436:       48 89 08                mov    %rcx,(%rax)                      
  SetCheckFailedCallback(TsanCheckFailed);                                      
   6d439:       e8 32 97 02 00          callq  96b70
<_ZN11__sanitizer22SetCheckFailedCallbackEPFvPKciS1_yyE>                        
  ctx = new(ctx_placeholder) Context;                                           
   6d43e:       48 8d 3d fb 7a 47 00    lea    0x477afb(%rip),%rdi        #
4e4f40 <_ZN6__tsanL15ctx_placeholderE>                                          
   6d445:       e8 26 f9 ff ff          callq  6cd70 <_ZN6__tsan7ContextC1Ev>   
  const char *options = GetEnv(SANITIZER_GO ? "GORACE" : "TSAN_OPTIONS");


More information about the Gcc-bugs mailing list