[compiler-rt] e7191fb - [RISCV][Lsan] Set allocator for AP64

Hau Hsu via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 8 03:18:09 PDT 2023


Author: Hau Hsu
Date: 2023-08-08T18:17:48+08:00
New Revision: e7191fbec3baa4ba0b03f560e51b6614f857483b

URL: https://github.com/llvm/llvm-project/commit/e7191fbec3baa4ba0b03f560e51b6614f857483b
DIFF: https://github.com/llvm/llvm-project/commit/e7191fbec3baa4ba0b03f560e51b6614f857483b.diff

LOG: [RISCV][Lsan] Set allocator for AP64

This patch uses similar allocator configuration to Asan, i.e. dynamic
allocator start address (~(uptr)0) and 128 GB allocator size.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D152895

Added: 
    

Modified: 
    compiler-rt/lib/lsan/lsan_allocator.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/lsan/lsan_allocator.h b/compiler-rt/lib/lsan/lsan_allocator.h
index 84cce4c6baebfa..f5486150a8121f 100644
--- a/compiler-rt/lib/lsan/lsan_allocator.h
+++ b/compiler-rt/lib/lsan/lsan_allocator.h
@@ -69,6 +69,9 @@ using PrimaryAllocator = PrimaryAllocatorASVT<LocalAddressSpaceView>;
 # if SANITIZER_FUCHSIA || defined(__powerpc64__)
 const uptr kAllocatorSpace = ~(uptr)0;
 const uptr kAllocatorSize  =  0x40000000000ULL;  // 4T.
+#  elif SANITIZER_RISCV64
+const uptr kAllocatorSpace = ~(uptr)0;
+const uptr kAllocatorSize = 0x2000000000ULL;  // 128G.
 #  elif SANITIZER_APPLE
 const uptr kAllocatorSpace = 0x600000000000ULL;
 const uptr kAllocatorSize  = 0x40000000000ULL;  // 4T.


        


More information about the llvm-commits mailing list