Skip to content

Commit c478370

Browse files
authored
Merge pull request #6299 from apple/rsundahl/revertalloc64
Revert "[Sanitizer] Clean up SANITIZER_CAN_USE_ALLOCATOR64 logic"
2 parents dbf965a + bda2fb0 commit c478370

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_platform.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,14 +279,15 @@
279279
#endif
280280

281281
// By default we allow to use SizeClassAllocator64 on 64-bit platform.
282-
// But in some cases SizeClassAllocator64 does not work well and we need to
283-
// fallback to SizeClassAllocator32.
282+
// But in some cases (e.g. AArch64's 39-bit address space) SizeClassAllocator64
283+
// does not work well and we need to fallback to SizeClassAllocator32.
284284
// For such platforms build this code with -DSANITIZER_CAN_USE_ALLOCATOR64=0 or
285285
// change the definition of SANITIZER_CAN_USE_ALLOCATOR64 here.
286286
#ifndef SANITIZER_CAN_USE_ALLOCATOR64
287-
# if SANITIZER_RISCV64 || SANITIZER_IOS
288-
# define SANITIZER_CAN_USE_ALLOCATOR64 0
289-
# elif defined(__mips64) || defined(__hexagon__)
287+
# if (SANITIZER_ANDROID && defined(__aarch64__)) || SANITIZER_FUCHSIA
288+
# define SANITIZER_CAN_USE_ALLOCATOR64 1
289+
# elif defined(__mips64) || defined(__aarch64__) || defined(__i386__) || \
290+
defined(__arm__) || SANITIZER_RISCV64 || defined(__hexagon__)
290291
# define SANITIZER_CAN_USE_ALLOCATOR64 0
291292
# else
292293
# define SANITIZER_CAN_USE_ALLOCATOR64 (SANITIZER_WORDSIZE == 64)

0 commit comments

Comments
 (0)