This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/55439] New: ThreadSanitizer: handle atomic operations


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]