This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/55439] New: ThreadSanitizer: handle atomic operations
- From: "dvyukov at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 22 Nov 2012 07:41:57 +0000
- Subject: [Bug other/55439] New: ThreadSanitizer: handle atomic operations
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: dvyukov@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