[PATCH] D40262: Correct NetBSD support in pthread_once(3)/TSan
Kamil Rytarowski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 20 12:31:07 PST 2017
krytarowski 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)));
----------------
dvyukov wrote:
> No, Kostya will not approve this.
OK, I will change it back to if().
================
Comment at: lib/tsan/rtl/tsan_interceptors.cc:1362
+ a = static_cast<atomic_uint32_t*>
+ ((void *)((char *)o + __sanitizer::pthread_t_sz));
+#else
----------------
dvyukov wrote:
> You said first field is pthread_mutex_t, why is this pthread_t_sz?
My mistake. I will try to add pthread_mutex_t_sz in sanitizer_platform_limits_netbsd.{cc,h} and reuse it.
Repository:
rL LLVM
https://reviews.llvm.org/D40262
More information about the llvm-commits
mailing list