[PATCH] D19722: [sanitizer] Don't reuse the main thread in ThreadRegistry

Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 2 08:12:05 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL268238: [sanitizer] Don't reuse the main thread in ThreadRegistry (authored by kuba.brecka).

Changed prior to commit:
  http://reviews.llvm.org/D19722?vs=55591&id=55821#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D19722

Files:
  compiler-rt/trunk/lib/sanitizer_common/sanitizer_thread_registry.cc

Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_thread_registry.cc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_thread_registry.cc
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_thread_registry.cc
@@ -277,6 +277,8 @@
 }
 
 void ThreadRegistry::QuarantinePush(ThreadContextBase *tctx) {
+  if (tctx->tid == 0)
+    return;  // Don't reuse the main thread.  It's a special snowflake.
   dead_threads_.push_back(tctx);
   if (dead_threads_.size() <= thread_quarantine_size_)
     return;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19722.55821.patch
Type: text/x-patch
Size: 575 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160502/1123f46a/attachment.bin>


More information about the llvm-commits mailing list