http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55439
Bug #: 55439 Summary: ThreadSanitizer: handle atomic operations Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: other AssignedTo: unassig...@gcc.gnu.org ReportedBy: dvyu...@google.com ThreadSanitizer instrumentation pass need to intercept builtin atomic operations. In the other compiler we intercept __sync builtins, __atomic builtins, C1x Atomic(T) and C1x/C++11 <atomic> atomics and translate them into calls into runtime library. For example, atomic<int32_t> a; a.load(memory_order_acquire); is translated into: __tsan_atomic32_load(&a, 2); The runtime interface is described in libsanitizer/tsan/tsan_interface_atomic.h