RFR: 8344168: Change Unsafe base offset from int to long [v2]
Dean Long
dlong at openjdk.org
Fri Nov 15 23:51:52 UTC 2024
On Fri, 15 Nov 2024 01:04:58 GMT, Shaojin Wen <swen at openjdk.org> wrote:
>> The type of the Unsafe base offset constant is int, which may cause overflow when adding int offsets, such as 8343925 (PR #22012). 8343984 (PR #22027) fixes most of the offset overflows in JDK, but ArraysSupport and CRC32C are still unfixed.
>>
>> @liach proposed the idea of changing the Unsafe base offset to long, which is a complete solution to the Unsafe offset overflow. After discussing with @liach, I submitted this PR to implement @liach's idea.
>
> Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:
>
> long BaseAndScale base, from @JornVernee
@ExE-Boss , are you saying the CSR doesn't apply to jdk.internal.*? The CSR FAQ says:
"Changes to public and exported APIs in jdk.*packages."
Whether or not it needs a CSR, I think there are apps outside the JDK that will break because of this change.
-------------
Changes requested by dlong (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/22095#pullrequestreview-2439944157
More information about the core-libs-dev
mailing list