[compiler-rt] [compiler-rt][lsan][Fuchsia] Adjust lsan allocator settings (PR #69401)

Roland McGrath via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 17 17:32:13 PDT 2023


================
@@ -68,23 +68,43 @@ using PrimaryAllocator = PrimaryAllocatorASVT<LocalAddressSpaceView>;
 #else
 # if SANITIZER_FUCHSIA || defined(__powerpc64__)
 const uptr kAllocatorSpace = ~(uptr)0;
+#    if SANITIZER_RISCV64
+// See the comments in compiler-rt/lib/asan/asan_allocator.h for why these
+// values were chosen.
+const uptr kAllocatorSize = UINT64_C(1) << 33;  // 8GB
+typedef SizeClassMap</*kNumBits=*/2,
+                     /*kMinSizeLog=*/5,
+                     /*kMidSizeLog=*/8,
+                     /*kMaxSizeLog=*/18,
+                     /*kNumCachedHintT=*/8,
+                     /*kMaxBytesCachedLog=*/10>
+    SizeClassMap;
----------------
frobtech wrote:

This renaming does not seem at all desirable. I'm a little amazed it even works.
The RHS here should be `DefaultSizeClassMap` and none of the changes outside this `#if` block should be made, AFAICT.


https://github.com/llvm/llvm-project/pull/69401


More information about the llvm-commits mailing list