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

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