https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78158
--- Comment #12 from Dmitry Vyukov <dvyukov at google dot com> ---
I want to land something along the following lines (with proper comments).
Any objections?
Index: tsan_interface_atomic.cc
===================================================================
--- tsan_interface_atomic.cc (revision 297833)
+++ tsan_interface_atomic.cc (working copy)
@@ -454,6 +454,7 @@
const uptr callpc = (uptr)__builtin_return_address(0); \
uptr pc = StackTrace::GetCurrentPc(); \
mo = flags()->force_seq_cst_atomics ? (morder)mo_seq_cst : mo; \
+ mo &= 7; \
ThreadState *const thr = cur_thread(); \
if (thr->ignore_interceptors) \
return NoTsanAtomic##func(__VA_ARGS__); \