[llvm-commits] [compiler-rt] r150371 - /compiler-rt/trunk/lib/asan/asan_thread_registry.cc

Evgeniy Stepanov eugeni.stepanov at gmail.com
Mon Feb 13 03:53:25 PST 2012


Author: eugenis
Date: Mon Feb 13 05:53:24 2012
New Revision: 150371

URL: http://llvm.org/viewvc/llvm-project?rev=150371&view=rev
Log:
[asan] Fix a crash in GetCurrent() of an undead thread.

Modified:
    compiler-rt/trunk/lib/asan/asan_thread_registry.cc

Modified: compiler-rt/trunk/lib/asan/asan_thread_registry.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_thread_registry.cc?rev=150371&r1=150370&r2=150371&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_thread_registry.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_thread_registry.cc Mon Feb 13 05:53:24 2012
@@ -73,7 +73,7 @@
     // limits, so only do this magic on Android, and only if the found thread is
     // the main thread.
     AsanThread* thread = FindThreadByStackAddress((uintptr_t)&summary);
-    if (thread->tid() == 0) {
+    if (thread && thread->tid() == 0) {
       SetCurrent(thread);
       return thread;
     }





More information about the llvm-commits mailing list