RFR: 8351334: [ubsan] memoryReserver.cpp:552:60: runtime error: applying non-zero offset 1073741824 to null pointer [v8]
David Holmes
dholmes at openjdk.org
Tue Oct 28 03:27:03 UTC 2025
On Mon, 20 Oct 2025 07:54:40 GMT, Afshin Zafari <azafari at openjdk.org> wrote:
>> The minimum acceptable value was 0 where using it as address was problematic according to UBSAN.
>> The acceptable value is changed to 64K.
>>
>> Tests:
>> linux-x64 tier1
>
> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
>
> subtraction for checking overflow
src/hotspot/share/gc/shared/jvmFlagConstraintsGC.cpp line 288:
> 286: // If an overflow happened in Arguments::set_heap_size(), MaxHeapSize will have too large a value.
> 287: // Check for this by ensuring that MaxHeapSize plus the requested min base address still fit within max_uintx.
> 288: if (std::numeric_limits<size_t>::max() - value < MaxHeapSize) { // overflow
Sorry but I still don't see how this new check is in practice any different to the existing (albeit conditional) `(value > (max_uintx - MaxHeapSize))`?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26955#discussion_r2467769558
More information about the hotspot-gc-dev
mailing list