[compiler-rt] 1231a2c - [lsan][Darwin][nfc] Fix thread vector size
Leonard Grey via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 15 14:36:05 PDT 2022
Author: Leonard Grey
Date: 2022-07-15T17:34:29-04:00
New Revision: 1231a2cec005b981955f25a119635f6a5f609043
URL: https://github.com/llvm/llvm-project/commit/1231a2cec005b981955f25a119635f6a5f609043
DIFF: https://github.com/llvm/llvm-project/commit/1231a2cec005b981955f25a119635f6a5f609043.diff
LOG: [lsan][Darwin][nfc] Fix thread vector size
The reserve constructor was removed in 44f55509d75d8c67077810bb6d9f3bedaea05831
but this one was missed. As a result, we attempt to iterate through 1024 threads
each time, most of which are 0.
Differential Revision: https://reviews.llvm.org/D129897
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_mac.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_mac.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_mac.cpp
index c87674ff7b76b..87f5250db648f 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_mac.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_mac.cpp
@@ -29,7 +29,7 @@ typedef struct {
class SuspendedThreadsListMac final : public SuspendedThreadsList {
public:
- SuspendedThreadsListMac() : threads_(1024) {}
+ SuspendedThreadsListMac() = default;
tid_t GetThreadID(uptr index) const override;
thread_t GetThread(uptr index) const;
More information about the llvm-commits
mailing list