Add temporal fix for https://github.com/google/sanitizers/issues/703.
authorMaxim Ostapenko <m.ostapenko@samsung.com>
Mon, 19 Sep 2016 14:38:07 +0000 (17:38 +0300)
committerIvan Baravy <i.baravy@samsung.com>
Tue, 21 Feb 2017 16:47:35 +0000 (19:47 +0300)
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 <m.ostapenko@samsung.com>
libsanitizer/lsan/lsan_allocator.cc

index 22b5f7e..1908c8e 100644 (file)
@@ -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;