From 35fb4b9a7c133def9cc3ff0b26b1fe17e348b843 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 4 Jun 2021 20:15:56 -0700 Subject: [PATCH] [lsan] Bump the thread limit from 1<<13 to 1<<22 This matches asan. Some applications need more than 1<<13 threads. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D103731 --- compiler-rt/lib/lsan/lsan_thread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler-rt/lib/lsan/lsan_thread.cpp b/compiler-rt/lib/lsan/lsan_thread.cpp index 8efb54a6fb77..9003620dd8fb 100644 --- a/compiler-rt/lib/lsan/lsan_thread.cpp +++ b/compiler-rt/lib/lsan/lsan_thread.cpp @@ -30,7 +30,7 @@ static ThreadContextBase *CreateThreadContext(u32 tid) { return new (mem) ThreadContext(tid); } -static const uptr kMaxThreads = 1 << 13; +static const uptr kMaxThreads = 1 << 22; // 4M static const uptr kThreadQuarantineSize = 64; void InitializeThreadRegistry() {