RFR: 8351334: [ubsan] memoryReserver.cpp:552:60: runtime error: applying non-zero offset 1073741824 to null pointer [v7]
Afshin Zafari
azafari at openjdk.org
Thu Oct 30 12:06:10 UTC 2025
On Mon, 20 Oct 2025 07:33:17 GMT, Afshin Zafari <azafari at openjdk.org> wrote:
>> 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 (value + MaxHeapSize < MaxHeapSize) { // overflow
>>
>> Sorry I am struggling to see how this check differs in practice to the existing check:
>>
>> (value > (max_uintx - MaxHeapSize))
>>
>> Further, the comment before the new check seems to relate to the existing check.
>
> Sorry it's my mistake in reading `max - a < b` as `a - b < b` .
Applied.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26955#discussion_r2477850829
More information about the hotspot-gc-dev
mailing list