[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
GitOrigin-RevId: ad6c8092dcb26b6991bab078e0e6cf1ab4836add
diff --git a/lib/sanitizer_common/sanitizer_platform.h b/lib/sanitizer_common/sanitizer_platform.h
index 7ecc465..98dbfe1 100644
--- a/lib/sanitizer_common/sanitizer_platform.h
+++ b/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)