[compiler-rt] [sanitizer] Warn if allocator size exceeds max user virtual address (PR #152428)
Florian Mayer via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 7 13:45:17 PDT 2025
================
@@ -113,6 +113,23 @@ class SizeClassAllocator64 {
// ~(uptr)0.
void Init(s32 release_to_os_interval_ms, uptr heap_start = 0) {
uptr TotalSpaceSize = kSpaceSize + AdditionalSize();
+
+ uptr MaxAddr = GetMaxUserVirtualAddress();
+ // VReport does not call the sanitizer allocator.
+ VReport(3, "Max user virtual address: 0x%zx\n", MaxAddr);
+ VReport(3, "Total space size for primary allocator: 0x%zx\n",
+ TotalSpaceSize);
+ // TODO: hypothetical edge case: on >48-bit VMA systems, Linux by default
----------------
fmayer wrote:
it's not immediately clear what there is TO DO
https://github.com/llvm/llvm-project/pull/152428
More information about the llvm-commits
mailing list