[compiler-rt] 13eb4fc - Revert "[NFC][compiler-rt][asan] Unify asan and lsan allocator settings"

Leonard Chan via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 7 17:34:43 PDT 2022


Author: Leonard Chan
Date: 2022-06-07T17:34:29-07:00
New Revision: 13eb4fc3ce1f8b96e421c5fb67d3db07de110f90

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

LOG: Revert "[NFC][compiler-rt][asan] Unify asan and lsan allocator settings"

This reverts commit dd045ddffc51db0a5ff9e00b1d55220af20614be.

This broke the sanitizer-windows builder at https://lab.llvm.org/buildbot/#/builders/127/builds/30751.

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 fed49b37dc56..27d826fb613a 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