|
|
ef53e9 |
2015-01-22 Jakub Jelinek <jakub@redhat.com>
|
|
|
ef53e9 |
|
|
|
ef53e9 |
* asan/asan_allocator.h (kAllocatorSpace, kAllocatorSize):
|
|
|
ef53e9 |
Set to 1T for __aarch64__.
|
|
|
ef53e9 |
* sanitizer_common/sanitizer_platform.h
|
|
|
ef53e9 |
(SANITIZER_CAN_USE_ALLOCATOR64): Set to 1 on __aarch64__
|
|
|
ef53e9 |
if SANITIZER_WORDSIZE is 64.
|
|
|
ef53e9 |
(SANITIZER_MMAP_RANGE_SIZE): Define to 1ULL << 42 for
|
|
|
ef53e9 |
__aarch64__.
|
|
|
ef53e9 |
|
|
|
ef53e9 |
--- libsanitizer/asan/asan_allocator.h (revision 219833)
|
|
|
ef53e9 |
+++ libsanitizer/asan/asan_allocator.h (working copy)
|
|
|
ef53e9 |
@@ -100,6 +100,10 @@
|
|
|
ef53e9 |
# if defined(__powerpc64__)
|
|
|
ef53e9 |
const uptr kAllocatorSpace = 0xa0000000000ULL;
|
|
|
ef53e9 |
const uptr kAllocatorSize = 0x20000000000ULL; // 2T.
|
|
|
ef53e9 |
+# elif defined(__aarch64__)
|
|
|
ef53e9 |
+// Valid only for 42-bit VA
|
|
|
ef53e9 |
+const uptr kAllocatorSpace = 0x10000000000ULL;
|
|
|
ef53e9 |
+const uptr kAllocatorSize = 0x10000000000ULL; // 1T.
|
|
|
ef53e9 |
# else
|
|
|
ef53e9 |
const uptr kAllocatorSpace = 0x600000000000ULL;
|
|
|
ef53e9 |
const uptr kAllocatorSize = 0x40000000000ULL; // 4T.
|
|
|
ef53e9 |
--- libsanitizer/sanitizer_common/sanitizer_platform.h (revision 219833)
|
|
|
ef53e9 |
+++ libsanitizer/sanitizer_common/sanitizer_platform.h (working copy)
|
|
|
ef53e9 |
@@ -79,7 +79,7 @@
|
|
|
ef53e9 |
// For such platforms build this code with -DSANITIZER_CAN_USE_ALLOCATOR64=0 or
|
|
|
ef53e9 |
// change the definition of SANITIZER_CAN_USE_ALLOCATOR64 here.
|
|
|
ef53e9 |
#ifndef SANITIZER_CAN_USE_ALLOCATOR64
|
|
|
ef53e9 |
-# if defined(__aarch64__) || defined(__mips64)
|
|
|
ef53e9 |
+# if defined(__mips64)
|
|
|
ef53e9 |
# define SANITIZER_CAN_USE_ALLOCATOR64 0
|
|
|
ef53e9 |
# else
|
|
|
ef53e9 |
# define SANITIZER_CAN_USE_ALLOCATOR64 (SANITIZER_WORDSIZE == 64)
|
|
|
ef53e9 |
@@ -88,10 +88,10 @@
|
|
|
ef53e9 |
|
|
|
ef53e9 |
// The range of addresses which can be returned my mmap.
|
|
|
ef53e9 |
// FIXME: this value should be different on different platforms,
|
|
|
ef53e9 |
-// e.g. on AArch64 it is most likely (1ULL << 39). Larger values will still work
|
|
|
ef53e9 |
+// e.g. on AArch64 it is most likely (1ULL << 42). Larger values will still work
|
|
|
ef53e9 |
// but will consume more memory for TwoLevelByteMap.
|
|
|
ef53e9 |
#if defined(__aarch64__)
|
|
|
ef53e9 |
-# define SANITIZER_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL << 39)
|
|
|
ef53e9 |
+# define SANITIZER_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL << 42)
|
|
|
ef53e9 |
#else
|
|
|
ef53e9 |
# define SANITIZER_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL << 47)
|
|
|
ef53e9 |
#endif
|