Skip to content

Commit cb36339

Browse files
committed
Revise TODO
1 parent 5948c0e commit cb36339

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary64.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,10 @@ class SizeClassAllocator64 {
119119
VReport(3, "Max user virtual address: 0x%zx\n", MaxAddr);
120120
VReport(3, "Total space size for primary allocator: 0x%zx\n",
121121
TotalSpaceSize);
122-
// TODO: hypothetical edge case: on >48-bit VMA systems, Linux by default
123-
// maps as if it was a 48-bit VMA, but a sanitizer could
124-
// theoretically map beyond the 48-bit limit (N.B. 2**48 == 256TB).
122+
// TODO: revise the check if we ever configure sanitizers to deliberately
123+
// map beyond the 2**48 barrier (note that Linux pretends the VMA is
124+
// limited to 48-bit for backwards compatibility, but allows apps to
125+
// explicitly specify an address beyond that).
125126
if (heap_start + TotalSpaceSize >= MaxAddr) {
126127
// We can't easily adjust the requested heap size, because kSpaceSize is
127128
// const (for optimization) and used throughout the code.

0 commit comments

Comments
 (0)