http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59215
--- Comment #3 from Kostya Serebryany <kcc at gcc dot gnu.org> ---
> I can try to come up with a minimal test case... Yet, I cannot imagine 
> that the following would ever work with TSan:
>              typedef int _Atomic_word;

It does not matter how _Atomic_word is defined.
What matters is how the code reads/write these atomics. 
If that's via __sync_* or __atomic_* intrinsics, tsan will understand that. 
But only if you re-compile stdlibc++ with tsan, 
otherwise tsan will still not see the atomic instructions. 
See the llvm bug mentioned above. 

> 
> I imagine, you'd need to "color" reading sites or change the type to 
> std::atomic.
> 
> Is this right?

Reply via email to