Blame SOURCES/gcc5-libsanitize-aarch64-va42.patch

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