diff options
| author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2015-11-09 18:05:24 +0000 |
|---|---|---|
| committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2015-11-09 18:05:24 +0000 |
| commit | 18b2258c92df93c83bc7fce94c20baff3c06e2c6 (patch) | |
| tree | c49fbd6ee388dfec31be56687f59102d699b5848 /compiler-rt/lib/sanitizer_common/sanitizer_platform.h | |
| parent | e8607ef204b7f4a6bae7ca2099e6430202a9bc95 (diff) | |
| download | bcm5719-llvm-18b2258c92df93c83bc7fce94c20baff3c06e2c6.tar.gz bcm5719-llvm-18b2258c92df93c83bc7fce94c20baff3c06e2c6.zip | |
[compiler-rt] [asan] Use same shadow offset for aarch64
This patch makes ASAN for aarch64 use the same shadow offset for all
currently supported VMAs (39 and 42 bits). The shadow offset is the
same for 39-bit (36).
llvm-svn: 252497
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_platform.h')
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_platform.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h index a1da6150fbe..a60691efbea 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h @@ -97,7 +97,7 @@ // For such platforms build this code with -DSANITIZER_CAN_USE_ALLOCATOR64=0 or // change the definition of SANITIZER_CAN_USE_ALLOCATOR64 here. #ifndef SANITIZER_CAN_USE_ALLOCATOR64 -# if defined(__mips64) || (defined(__aarch64__) && SANITIZER_AARCH64_VMA == 39) +# if defined(__mips64) || defined(__aarch64__) # define SANITIZER_CAN_USE_ALLOCATOR64 0 # else # define SANITIZER_CAN_USE_ALLOCATOR64 (SANITIZER_WORDSIZE == 64) @@ -105,16 +105,9 @@ #endif // The range of addresses which can be returned my mmap. -// FIXME: this value should be different on different platforms, -// e.g. on AArch64 it is most likely (1ULL << 39). Larger values will still work -// but will consume more memory for TwoLevelByteMap. -#if defined(__aarch64__) -# if SANITIZER_AARCH64_VMA == 39 -# define SANITIZER_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL << 39) -# elif SANITIZER_AARCH64_VMA == 42 -# define SANITIZER_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL << 42) -# endif -#elif defined(__mips__) +// FIXME: this value should be different on different platforms. Larger values +// 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) #else # define SANITIZER_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL << 47) |

