[compiler-rt] [asan] Change Apple back to fixed allocator base address (PR #104818)

Thurston Dang via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 10:32:04 PDT 2024


https://github.com/thurstond created https://github.com/llvm/llvm-project/pull/104818

This partially reverts https://github.com/llvm/llvm-project/pull/98511
- specifically, the SANITIZER_APPLE case - because of a suspected breakage for clang on Mac (https://g-issues.chromium.org/issues/360160858).

>From ffa345d082adb5b79ac223127e17bb54f9ffa3a1 Mon Sep 17 00:00:00 2001
From: Thurston Dang <thurston at google.com>
Date: Mon, 19 Aug 2024 17:24:42 +0000
Subject: [PATCH] [asan] Change Apple back to fixed allocator base address

This partially reverts https://github.com/llvm/llvm-project/pull/98511
- specifically, the SANITIZER_APPLE case - because of a suspected breakage for clang on Mac
(https://g-issues.chromium.org/issues/360160858).
---
 compiler-rt/lib/asan/asan_allocator.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/compiler-rt/lib/asan/asan_allocator.h b/compiler-rt/lib/asan/asan_allocator.h
index b52cdeb7308923..db8dc3bebfc620 100644
--- a/compiler-rt/lib/asan/asan_allocator.h
+++ b/compiler-rt/lib/asan/asan_allocator.h
@@ -189,7 +189,13 @@ const uptr kAllocatorSize = 0x40000000000ULL;  // 4T.
 typedef DefaultSizeClassMap SizeClassMap;
 #    endif  // SANITIZER_RISCV64
 #  else     // SANITIZER_FUCHSIA
+
+#    if SANITIZER_APPLE
+const uptr kAllocatorSpace = 0x600000000000ULL;
+#    else   // SANITIZER_APPLE
 const uptr kAllocatorSpace = ~(uptr)0;
+#    endif  // SANITIZER_APPLE
+
 #    if defined(__powerpc64__)
 const uptr kAllocatorSize  =  0x20000000000ULL;  // 2T.
 typedef DefaultSizeClassMap SizeClassMap;



More information about the llvm-commits mailing list