lsan: fix allocator on arm64 Android (#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.
This commit is contained in:
quic-likaid
2025-10-31 10:43:07 +08:00
committed by GitHub
parent 56777e7da2
commit bf99f6693e

View File

@@ -93,6 +93,10 @@ using LSanSizeClassMap = DefaultSizeClassMap;
const uptr kAllocatorSpace = 0x600000000000ULL;
const uptr kAllocatorSize = 0x40000000000ULL; // 4T.
using LSanSizeClassMap = DefaultSizeClassMap;
# elif SANITIZER_ANDROID && defined(__aarch64__)
const uptr kAllocatorSpace = 0x3000000000ULL;
const uptr kAllocatorSize = 0x2000000000ULL;
using LSanSizeClassMap = VeryCompactSizeClassMap;
# else
const uptr kAllocatorSpace = 0x500000000000ULL;
const uptr kAllocatorSize = 0x40000000000ULL; // 4T.