Skip to content

Commit e7191fb

Browse files
hau-hsuhauhsu
authored andcommitted
[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
1 parent 4492ec7 commit e7191fb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler-rt/lib/lsan/lsan_allocator.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ using PrimaryAllocator = PrimaryAllocatorASVT<LocalAddressSpaceView>;
6969
# if SANITIZER_FUCHSIA || defined(__powerpc64__)
7070
const uptr kAllocatorSpace = ~(uptr)0;
7171
const uptr kAllocatorSize = 0x40000000000ULL; // 4T.
72+
# elif SANITIZER_RISCV64
73+
const uptr kAllocatorSpace = ~(uptr)0;
74+
const uptr kAllocatorSize = 0x2000000000ULL; // 128G.
7275
# elif SANITIZER_APPLE
7376
const uptr kAllocatorSpace = 0x600000000000ULL;
7477
const uptr kAllocatorSize = 0x40000000000ULL; // 4T.

0 commit comments

Comments
 (0)