Skip to content

Commit 00b8e50

Browse files
quic-likaidDebadri Basak
authored andcommitted
lsan: fix allocator on arm64 Android (llvm#165656)
The default config is too large for arm64 Android devices, which are typically configured with 39-bit address space. This change brings it inline with sanitizer_allocator_test.cpp.
1 parent 5015c42 commit 00b8e50

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler-rt/lib/lsan/lsan_allocator.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ using LSanSizeClassMap = DefaultSizeClassMap;
9393
const uptr kAllocatorSpace = 0x600000000000ULL;
9494
const uptr kAllocatorSize = 0x40000000000ULL; // 4T.
9595
using LSanSizeClassMap = DefaultSizeClassMap;
96+
# elif SANITIZER_ANDROID && defined(__aarch64__)
97+
const uptr kAllocatorSpace = 0x3000000000ULL;
98+
const uptr kAllocatorSize = 0x2000000000ULL;
99+
using LSanSizeClassMap = VeryCompactSizeClassMap;
96100
# else
97101
const uptr kAllocatorSpace = 0x500000000000ULL;
98102
const uptr kAllocatorSize = 0x40000000000ULL; // 4T.

0 commit comments

Comments
 (0)