Commit 278ccdacdcbde3399f1fa4b3ab929212e4e0322c says that kAllocatorSize
must be >= (1<<32), but this is not accurate. This static_assert causes 128GiB
kAllocatorSize to be unable to select DefaultSizeClassMap (kRegionSize is
1<<31).
Relax the restriction to be able to satisfy the largest size class. This allows
DefaultSizeClassMap to be usable with 128GiB kAllocatorSize, with
check-{asan,lsan,sanitizer} passing.
@MaskRay I was seeing this when building on Windows with ToT:
C:\git\llvm-project>ninja check-asan -C stage1_msvc ninja: Entering directory `stage1_msvc' [33/56] Generating ASAN_NOINST_TEST_OBJECTS.asan_noinst_test.cpp.x86_64-inline.o In file included from C:/git/llvm-project/compiler-rt/lib/asan/tests/asan_noinst_test.cpp:24: In file included from C:/git/llvm-project/compiler-rt/lib/asan\asan_allocator.h:20: In file included from C:/git/llvm-project/compiler-rt/lib\sanitizer_common/sanitizer_allocator.h:74: C:/git/llvm-project/compiler-rt/lib\sanitizer_common\sanitizer_allocator_primary64.h:639:54: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] 639 | static_assert(kRegionSize >= SizeClassMap::kMaxSize); | ^ | , "" 1 warning generated.I fixed it in https://reviews.llvm.org/rGd58fb40670ea