[PATCH] D126825: [compiler-rt][lsan] Choose lsan allocator via SANITIZER_CAN_USE_ALLOCATOR64
Leonard Chan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 7 17:24:07 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4b15e665f8d9: [compiler-rt][lsan] Choose lsan allocator via SANITIZER_CAN_USE_ALLOCATOR64 (authored by leonardchan).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126825/new/
https://reviews.llvm.org/D126825
Files:
compiler-rt/lib/lsan/lsan_allocator.h
compiler-rt/lib/sanitizer_common/sanitizer_platform.h
Index: compiler-rt/lib/sanitizer_common/sanitizer_platform.h
===================================================================
--- compiler-rt/lib/sanitizer_common/sanitizer_platform.h
+++ compiler-rt/lib/sanitizer_common/sanitizer_platform.h
@@ -285,7 +285,8 @@
#ifndef SANITIZER_CAN_USE_ALLOCATOR64
# if (SANITIZER_ANDROID && defined(__aarch64__)) || SANITIZER_FUCHSIA
# define SANITIZER_CAN_USE_ALLOCATOR64 1
-# elif defined(__mips64) || defined(__aarch64__)
+# elif defined(__mips64) || defined(__aarch64__) || defined(__i386__) || \
+ defined(__arm__) || SANITIZER_RISCV64 || defined(__hexagon__)
# define SANITIZER_CAN_USE_ALLOCATOR64 0
# else
# define SANITIZER_CAN_USE_ALLOCATOR64 (SANITIZER_WORDSIZE == 64)
Index: compiler-rt/lib/lsan/lsan_allocator.h
===================================================================
--- compiler-rt/lib/lsan/lsan_allocator.h
+++ compiler-rt/lib/lsan/lsan_allocator.h
@@ -49,8 +49,7 @@
u32 stack_trace_id;
};
-#if defined(__mips64) || defined(__aarch64__) || defined(__i386__) || \
- defined(__arm__) || SANITIZER_RISCV64 || defined(__hexagon__)
+#if !SANITIZER_CAN_USE_ALLOCATOR64
template <typename AddressSpaceViewTy>
struct AP32 {
static const uptr kSpaceBeg = 0;
@@ -65,7 +64,7 @@
template <typename AddressSpaceView>
using PrimaryAllocatorASVT = SizeClassAllocator32<AP32<AddressSpaceView>>;
using PrimaryAllocator = PrimaryAllocatorASVT<LocalAddressSpaceView>;
-#elif defined(__x86_64__) || defined(__powerpc64__) || defined(__s390x__)
+#else
# if SANITIZER_FUCHSIA || defined(__powerpc64__)
const uptr kAllocatorSpace = ~(uptr)0;
const uptr kAllocatorSize = 0x40000000000ULL; // 4T.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126825.435003.patch
Type: text/x-patch
Size: 1685 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220608/ac0417bb/attachment.bin>
More information about the llvm-commits
mailing list