RFR: 8354428: [ubsan] g1BiasedArray.hpp: pointer overflow in address calculation
Thomas Schatzl
tschatzl at openjdk.org
Wed May 28 06:57:56 UTC 2025
On Tue, 27 May 2025 07:32:08 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> Hi all,
>>
>> please review this fix for an ubsan error related to pointer under- or overflows when using the biased array helper.
>>
>> The fix is, instead of using direct address calculations that can cause these errors, use `uintptr_t` where the overflow behavior is defined in C++. Only convert to pointer at the actual access.
>>
>> Testing: gha, tier1
>
> Seems some copyright info in headers needs adjustment, see vmStructs_g1.hpp .
Thanks @MBaesken @kimbarrett @albertnetymk for your reviews
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25447#issuecomment-2915182298
More information about the hotspot-gc-dev
mailing list