Skip to content

Commit 9bb2130

Browse files
committed
rebase
Created using spr 1.3.4
2 parents a28ba5d + 3cb4d20 commit 9bb2130

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class SANITIZER_MUTEX ThreadRegistry {
102102

103103
// Should be guarded by ThreadRegistryLock.
104104
ThreadContextBase *GetThreadLocked(u32 tid) {
105-
return threads_.empty() ? nullptr : threads_[tid];
105+
return tid < threads_.size() ? threads_[tid] : nullptr;
106106
}
107107

108108
u32 NumThreadsLocked() const { return threads_.size(); }

0 commit comments

Comments
 (0)