[all-commits] [llvm/llvm-project] 997126: [sanitizer] Relax the restriction on SizeClassAllo...

Fangrui Song via All-commits all-commits at lists.llvm.org
Tue Jun 27 19:47:16 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9971269ea72aeedc26718522e7e0682f79b63b6c
      https://github.com/llvm/llvm-project/commit/9971269ea72aeedc26718522e7e0682f79b63b6c
  Author: Fangrui Song <i at maskray.me>
  Date:   2023-06-27 (Tue, 27 Jun 2023)

  Changed paths:
    M compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary64.h

  Log Message:
  -----------
  [sanitizer] Relax the restriction on SizeClassAllocator64::kAllocatorSize

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.

Reviewed By: #sanitizers, vitalybuka, kstoimenov

Differential Revision: https://reviews.llvm.org/D153664




More information about the All-commits mailing list