forked from OSchip/llvm-project
tsan: don't crash with NULL deref during reporting
tctx==NULL crash observed during deadlock reporting. There seems to be some bugs in the deadlock detector, but it is still useful to be more robust during reporting. llvm-svn: 224508
This commit is contained in:
parent
a4cd69217b
commit
e1881269f8
|
@ -251,7 +251,9 @@ ThreadContext *IsThreadStackOrTls(uptr addr, bool *is_stack) {
|
|||
|
||||
void ScopedReport::AddThread(int unique_tid, bool suppressable) {
|
||||
#ifndef SANITIZER_GO
|
||||
AddThread(FindThreadByUidLocked(unique_tid), suppressable);
|
||||
const ThreadContext *tctx = FindThreadByUidLocked(unique_tid);
|
||||
if (tctx)
|
||||
AddThread(FindThreadByUidLocked(unique_tid), suppressable);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue