From ad6c8092dcb26b6991bab078e0e6cf1ab4836add Mon Sep 17 00:00:00 2001 From: Roy Sundahl Date: Wed, 30 Nov 2022 09:57:06 -0800 Subject: [PATCH] [asan][aarch64] Don't use 64 bit allocator for Apple ios family The recent change (https://reviews.llvm.org/D137136) to unconditionally choose the 64 bit allocator on aarch64 breaks Apple iOS family of devices which purposely use a smaller address space than is used with macOS. rdar://102527313 Reviewed By: thetruestblue, yln Differential Revision: https://reviews.llvm.org/D139030 --- compiler-rt/lib/sanitizer_common/sanitizer_platform.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h index 7ecc465..98dbfe1 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h @@ -287,7 +287,8 @@ # if (SANITIZER_ANDROID && defined(__aarch64__)) || SANITIZER_FUCHSIA # define SANITIZER_CAN_USE_ALLOCATOR64 1 # elif defined(__mips64) || defined(__arm__) || defined(__i386__) || \ - SANITIZER_RISCV64 || defined(__hexagon__) + SANITIZER_RISCV64 || defined(__hexagon__) || \ + (SANITIZER_APPLE && defined(__aarch64__)) # define SANITIZER_CAN_USE_ALLOCATOR64 0 # else # define SANITIZER_CAN_USE_ALLOCATOR64 (SANITIZER_WORDSIZE == 64) -- 2.7.4