[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
Wed Jun 1 14:10:38 PDT 2022
leonardchan created this revision.
leonardchan added a reviewer: vitalybuka.
leonardchan added a project: Sanitizers.
Herald added subscribers: Enna1, luke957, s.egerton, simoncook, dberris.
Herald added a project: All.
leonardchan requested review of this revision.
Herald added subscribers: Sanitizers, pcwang-thead.
Rather than checking a bunch of individual platforms.
Repository:
rG LLVM Github Monorepo
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
@@ -283,7 +283,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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126825.433542.patch
Type: text/x-patch
Size: 1253 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220601/9ce1f8ea/attachment.bin>
More information about the llvm-commits
mailing list