File gcc5-libsanitize-aarch64-va42.patch of Package cross-armv6hl-gcc6.6376
2015-01-22 Jakub Jelinek <jakub@redhat.com>
* asan/asan_allocator.h (kAllocatorSpace, kAllocatorSize):
Set to 1T for __aarch64__.
* sanitizer_common/sanitizer_platform.h
(SANITIZER_CAN_USE_ALLOCATOR64): Set to 1 on __aarch64__
if SANITIZER_WORDSIZE is 64.
(SANITIZER_MMAP_RANGE_SIZE): Define to 1ULL << 42 for
__aarch64__.
Index: libsanitizer/sanitizer_common/sanitizer_platform.h
===================================================================
--- libsanitizer/sanitizer_common/sanitizer_platform.h.orig 2015-12-17 15:14:33.046487166 +0100
+++ libsanitizer/sanitizer_common/sanitizer_platform.h 2015-12-17 15:16:13.943662509 +0100
@@ -95,7 +95,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__)
+# if defined(__mips64)
# define SANITIZER_CAN_USE_ALLOCATOR64 0
# else
# define SANITIZER_CAN_USE_ALLOCATOR64 (SANITIZER_WORDSIZE == 64)
@@ -108,7 +108,11 @@
#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)
+# if defined(__aarch64__)
+# define SANITIZER_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL << 42)
+# else
+# define SANITIZER_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL << 47)
+# endif
#endif
// The AArch64 linux port uses the canonical syscall set as mandated by