RFR: 8351334: [ubsan] memoryReserver.cpp:552:60: runtime error: applying non-zero offset 1073741824 to null pointer [v4]
Axel Boldt-Christmas
aboldtch at openjdk.org
Mon Sep 15 10:13:23 UTC 2025
On Mon, 15 Sep 2025 08:49:42 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:
>
> fixes
I agree with @jdksjolen that I think we should go towards using `uintptr_t` as far as possible. Maybe we do it piecemeal like this. Eventually we could end up using `uintptr_t` until we reach the os layer.
Looks like you at least have to clean up the `uintptr_t` vs `uint64_t` in the touched methods as some platforms have them define as `unsigned long` vs `unsigned long long`.
src/hotspot/share/memory/memoryReserver.cpp line 612:
> 610: }
> 611: lowest_start = align_up(lowest_start, attach_point_alignment);
> 612: assert(lowest_start < highest_start, "lowest: " INTPTR_FORMAT " highest: " INTPTR_FORMAT,
We should support a start which is a single value.
Suggestion:
assert(lowest_start <= highest_start, "lowest: " INTPTR_FORMAT " highest: " INTPTR_FORMAT,
-------------
PR Review: https://git.openjdk.org/jdk/pull/26955#pullrequestreview-3223852121
PR Review Comment: https://git.openjdk.org/jdk/pull/26955#discussion_r2348500738
More information about the hotspot-gc-dev
mailing list