[PATCH] D14644: [tsan] Fix finalization of detached threads on OS X

Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 13 12:48:13 PST 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL253079: [tsan] Fix finalization of detached threads on OS X (authored by kuba.brecka).

Changed prior to commit:
  http://reviews.llvm.org/D14644?vs=40126&id=40172#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14644

Files:
  compiler-rt/trunk/lib/tsan/rtl/tsan_platform_mac.cc

Index: compiler-rt/trunk/lib/tsan/rtl/tsan_platform_mac.cc
===================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_platform_mac.cc
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_platform_mac.cc
@@ -139,7 +139,7 @@
     }
   } else if (event == PTHREAD_INTROSPECTION_THREAD_DESTROY) {
     ThreadState *thr = cur_thread();
-    if (thr->tctx->parent_tid == kInvalidTid) {
+    if (thr->tctx && thr->tctx->parent_tid == kInvalidTid) {
       DestroyThreadState();
     }
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14644.40172.patch
Type: text/x-patch
Size: 519 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151113/a46371cc/attachment.bin>


More information about the llvm-commits mailing list