[compiler-rt] 060907d - Revert "Reland "[NFC][compiler-rt][asan] Unify asan and lsan allocator settings""
Leonard Chan via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 8 11:56:48 PDT 2022
Author: Leonard Chan
Date: 2022-06-08T11:56:33-07:00
New Revision: 060907dd008011256da84ad48e93ddd1eae087ea
URL: https://github.com/llvm/llvm-project/commit/060907dd008011256da84ad48e93ddd1eae087ea
DIFF: https://github.com/llvm/llvm-project/commit/060907dd008011256da84ad48e93ddd1eae087ea.diff
LOG: Revert "Reland "[NFC][compiler-rt][asan] Unify asan and lsan allocator settings""
This reverts commit b37d84aa8d59dde2fae7388da5101bf471ec3434.
This broke aarch64 asan builders for fuchsia. I accidentally changed the allocator
settings for fuchsia on aarch64 because the new asan allocator settings use:
```
// AArch64/SANITIZER_CAN_USE_ALLOCATOR64 is only for 42-bit VMA
// so no need to different values for different VMA.
const uptr kAllocatorSpace = 0x10000000000ULL;
const uptr kAllocatorSize = 0x10000000000ULL; // 3T.
typedef DefaultSizeClassMap SizeClassMap;
```
rather than reaching the final `#else` which would use fuchsia's lsan config.
Added:
Modified:
compiler-rt/lib/asan/asan_allocator.h
Removed:
################################################################################
diff --git a/compiler-rt/lib/asan/asan_allocator.h b/compiler-rt/lib/asan/asan_allocator.h
index fed49b37dc561..27d826fb613ae 100644
--- a/compiler-rt/lib/asan/asan_allocator.h
+++ b/compiler-rt/lib/asan/asan_allocator.h
@@ -17,7 +17,6 @@
#include "asan_flags.h"
#include "asan_interceptors.h"
#include "asan_internal.h"
-#include "lsan/lsan_allocator.h"
#include "sanitizer_common/sanitizer_allocator.h"
#include "sanitizer_common/sanitizer_list.h"
#include "sanitizer_common/sanitizer_platform.h"
@@ -119,9 +118,12 @@ struct AsanMapUnmapCallback {
};
#if SANITIZER_CAN_USE_ALLOCATOR64
-# if defined(__powerpc64__)
+# if SANITIZER_FUCHSIA
+const uptr kAllocatorSpace = ~(uptr)0;
+const uptr kAllocatorSize = 0x40000000000ULL; // 4T.
+typedef DefaultSizeClassMap SizeClassMap;
+# elif defined(__powerpc64__)
const uptr kAllocatorSpace = ~(uptr)0;
-// NOTE: This
diff ers slightly from the LSan allocator size which is 4T.
const uptr kAllocatorSize = 0x20000000000ULL; // 2T.
typedef DefaultSizeClassMap SizeClassMap;
# elif defined(__aarch64__) && SANITIZER_ANDROID
@@ -148,9 +150,8 @@ const uptr kAllocatorSpace = ~(uptr)0;
const uptr kAllocatorSize = 0x8000000000ULL; // 500G
typedef DefaultSizeClassMap SizeClassMap;
# else
-// Use LSan's allocator configs.
-const uptr kAllocatorSpace = __lsan::kAllocatorSpace;
-const uptr kAllocatorSize = __lsan::kAllocatorSize;
+const uptr kAllocatorSpace = 0x600000000000ULL;
+const uptr kAllocatorSize = 0x40000000000ULL; // 4T.
typedef DefaultSizeClassMap SizeClassMap;
# endif
template <typename AddressSpaceViewTy>
More information about the llvm-commits
mailing list