forked from OSchip/llvm-project
[asan] Fix a crash in GetCurrent() of an undead thread.
llvm-svn: 150371
This commit is contained in:
parent
f81b9d172a
commit
56ae29f92d
|
@ -73,7 +73,7 @@ AsanThread *AsanThreadRegistry::GetCurrent() {
|
|||
// 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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue