From: Maxim Ostapenko Date: Mon, 19 Sep 2016 14:38:07 +0000 (+0300) Subject: Add temporal fix for https://github.com/google/sanitizers/issues/703. X-Git-Tag: accepted/tizen/base/20170413.143919~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=533a2c236775f2a20520dcbd2c577bd65a1a4bb8;p=platform%2Fupstream%2Flinaro-gcc.git 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 --- 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;