[PATCH] D40262: Correct NetBSD support in pthread_once(3)/TSan

Dmitry Vyukov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 20 12:24:16 PST 2017


dvyukov added inline comments.


================
Comment at: lib/tsan/rtl/tsan_interceptors.cc:1358
+
+#if SANITIZER_MAC
+  a = static_cast<atomic_uint32_t*>((void *)((char *)o + sizeof(long_t)));
----------------
No, Kostya will not approve this.


================
Comment at: lib/tsan/rtl/tsan_interceptors.cc:1362
+  a = static_cast<atomic_uint32_t*>
+        ((void *)((char *)o + __sanitizer::pthread_t_sz));
+#else
----------------
You said first field is pthread_mutex_t, why is this pthread_t_sz?


Repository:
  rL LLVM

https://reviews.llvm.org/D40262





More information about the llvm-commits mailing list