Add temporal fix for https://github.com/google/sanitizers/issues/703. 57/88557/4
authorMaxim Ostapenko <m.ostapenko@samsung.com>
Mon, 19 Sep 2016 14:38:07 +0000 (17:38 +0300)
committerDongkyun Son <dongkyun.s@samsung.com>
Tue, 11 Oct 2016 12:55:58 +0000 (05:55 -0700)
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 3dbf5c1..c3fd6ae 100644 (file)
@@ -39,6 +39,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;