From ab1b926bb9033018ace8d1dbe780ac954659a94b Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 18 Jul 2016 14:47:18 +0000 Subject: [PATCH] [asan] Enable 48-bit VMA support on aarch64 This patch adds 48-bits VMA support for asan on aarch64. The current 47-bit mask is not suffice since on aarch64 kernel with 48-bit vma (default on ubuntu 16.04) the process may use full VMA range as: [...] ffffa39a7000-ffffa39a8000 r--p 00000000 00:00 0 [vvar] ffffa39a8000-ffffa39a9000 r-xp 00000000 00:00 0 [vdso] ffffa39a9000-ffffa39aa000 r--p 0001c000 08:02 13631554 /lib/aarch64-linux-gnu/ld-2.23.so ffffa39aa000-ffffa39ac000 rw-p 0001d000 08:02 13631554 /lib/aarch64-linux-gnu/ld-2.23.so ffffc2227000-ffffc2248000 rw-p 00000000 00:00 0 [stack] llvm-svn: 275792 --- compiler-rt/lib/sanitizer_common/sanitizer_platform.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h index 8824912..0ce2307 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h @@ -180,6 +180,8 @@ // will still work but will consume more memory for TwoLevelByteMap. #if defined(__mips__) # define SANITIZER_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL << 40) +#elif defined(__aarch64__) +# define SANITIZER_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL << 48) #else # define SANITIZER_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL << 47) #endif -- 2.7.4