[PATCH] D31883: Don't assume PTHREAD_CREATE_JOINABLE is 0 on all systems

Aleksey Shlyapnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 12 14:56:21 PDT 2017


alekseyshl accepted this revision.
alekseyshl added a comment.
This revision is now accepted and ready to land.

Other than tsan_interceptors.cc question, lgtm.



================
Comment at: lib/lsan/lsan_interceptors.cc:289
+    int tid = ThreadCreate(GetCurrentThread(), *(uptr *)th,
+                           IsStateDetached(detached));
     CHECK_NE(tid, 0);
----------------
fjricci wrote:
> alekseyshl wrote:
> > What about !SANITIZER_POSIX case? Who's going to provide this function?
> Lots of other things in this function will also break in the !SANITIZER_POSIX case - pthread_attr_getdetachstate, pthread_create, etc. I don't think this file is currently designed to work at all in non-posix cases.
Let's remove #if SANITIZER_POSIX around include then, it's misleading.

What about tsan_interceptors.cc? Is it also posix only?


https://reviews.llvm.org/D31883





More information about the llvm-commits mailing list