Skip to content

Commit 511077d

Browse files
authored
[sanitizers] Bump malloc limit to 1TB for MSAN, LSAN & DFSAN (llvm#89728)
We already have `const uptr kMaxAllowedMallocSize = 1ULL << 40;` set for ASAN, HWASAN, memprof, TSAN. This patch bumps the malloc limit for MSAN, LSAN and DFSAN to 1TB as well. 8GB is simply not enough nowadays.
1 parent c2e0afe commit 511077d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

compiler-rt/lib/dfsan/dfsan_allocator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const uptr kAllocatorSpace = 0xE00000000000ULL;
4545
#else
4646
const uptr kAllocatorSpace = 0x700000000000ULL;
4747
#endif
48-
const uptr kMaxAllowedMallocSize = 8UL << 30;
48+
const uptr kMaxAllowedMallocSize = 1ULL << 40;
4949

5050
struct AP64 { // Allocator64 parameters. Deliberately using a short name.
5151
static const uptr kSpaceBeg = kAllocatorSpace;

compiler-rt/lib/lsan/lsan_allocator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static const uptr kMaxAllowedMallocSize = 1ULL << 30;
3131
#elif defined(__mips64) || defined(__aarch64__)
3232
static const uptr kMaxAllowedMallocSize = 4ULL << 30;
3333
#else
34-
static const uptr kMaxAllowedMallocSize = 8ULL << 30;
34+
static const uptr kMaxAllowedMallocSize = 1ULL << 40;
3535
#endif
3636

3737
static Allocator allocator;

compiler-rt/lib/msan/msan_allocator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ static const uptr kAllocatorSpace = 0x700000000000ULL;
7171
#else
7272
static const uptr kAllocatorSpace = 0x600000000000ULL;
7373
#endif
74-
static const uptr kMaxAllowedMallocSize = 8UL << 30;
74+
static const uptr kMaxAllowedMallocSize = 1ULL << 40;
7575

7676
struct AP64 { // Allocator64 parameters. Deliberately using a short name.
7777
static const uptr kSpaceBeg = kAllocatorSpace;

0 commit comments

Comments
 (0)