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

Francis Ricci via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 11 10:10:55 PDT 2017


fjricci added inline comments.


================
Comment at: lib/lsan/lsan_interceptors.cc:61
+#endif
+
 INTERCEPTOR(void*, malloc, uptr size) {
----------------
alekseyshl wrote:
> Why do we have to define them? why not use the proper definition in phtread.h?
We don't want to include any system headers in this file.


================
Comment at: lib/lsan/lsan_interceptors.cc:283
   AdjustStackSize(attr);
   int detached = 0;
   pthread_attr_getdetachstate(attr, &detached);
----------------
alekseyshl wrote:
> int detached = PTHREAD_CREATE_JOINABLE; to be consistent with the rest of your change.
This review established that we don't want to define PTHREAD_CREATE_JOINABLE (that value will get over-written by pthread_attr_getdetachstate anyway): D10606


https://reviews.llvm.org/D31883





More information about the llvm-commits mailing list