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