From 533a2c236775f2a20520dcbd2c577bd65a1a4bb8 Mon Sep 17 00:00:00 2001 From: Maxim Ostapenko Date: Mon, 19 Sep 2016 17:38:07 +0300 Subject: [PATCH] Add temporal fix for https://github.com/google/sanitizers/issues/703. Redefine SANITIZER_MMAP_RANGE_SIZE to (1UL << 40) for AArch64. This is a workaround for https://github.com/google/sanitizers/issues/703 that speeds up LSan and makes it usable for AArch64. Change-Id: I31672b4feab6c91a2ec17fae76ab9d1d494aeb5c Signed-off-by: Maxim Ostapenko --- libsanitizer/lsan/lsan_allocator.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libsanitizer/lsan/lsan_allocator.cc b/libsanitizer/lsan/lsan_allocator.cc index 22b5f7e..1908c8e 100644 --- a/libsanitizer/lsan/lsan_allocator.cc +++ b/libsanitizer/lsan/lsan_allocator.cc @@ -33,6 +33,8 @@ struct ChunkMetadata { #if defined(__mips64) || defined(__aarch64__) static const uptr kMaxAllowedMallocSize = 4UL << 30; static const uptr kRegionSizeLog = 20; +#undef SANITIZER_MMAP_RANGE_SIZE +#define SANITIZER_MMAP_RANGE_SIZE (1UL << 40) static const uptr kNumRegions = SANITIZER_MMAP_RANGE_SIZE >> kRegionSizeLog; typedef TwoLevelByteMap<(kNumRegions >> 12), 1 << 12> ByteMap; typedef CompactSizeClassMap SizeClassMap; -- 2.7.4