We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df4c913 commit 3cb4d20Copy full SHA for 3cb4d20
compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.h
@@ -101,7 +101,7 @@ class SANITIZER_MUTEX ThreadRegistry {
101
102
// Should be guarded by ThreadRegistryLock.
103
ThreadContextBase *GetThreadLocked(u32 tid) {
104
- return threads_.empty() ? nullptr : threads_[tid];
+ return tid < threads_.size() ? threads_[tid] : nullptr;
105
}
106
107
u32 NumThreadsLocked() const { return threads_.size(); }
0 commit comments