From: Leonard Chan Date: Wed, 8 Jun 2022 00:33:24 +0000 (-0700) Subject: Revert "[NFC][compiler-rt][asan] Unify asan and lsan allocator settings" X-Git-Tag: upstream/15.0.7~5575 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=13eb4fc3ce1f8b96e421c5fb67d3db07de110f90;p=platform%2Fupstream%2Fllvm.git 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. --- diff --git a/compiler-rt/lib/asan/asan_allocator.h b/compiler-rt/lib/asan/asan_allocator.h index fed49b3..27d826f 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 differs 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