RFR: 8344168: Change Unsafe base offset from int to long

Shaojin Wen swen at openjdk.org
Thu Nov 14 15:09:22 UTC 2024


On Thu, 14 Nov 2024 13:44:10 GMT, Chen Liang <liach at openjdk.org> wrote:

> I think you should convert all array index scales to long too. They are susceptible to the same overflow problem (actually more susceptible as they involve in integer multiplications)

The only places in JDK where there is a risk of offset overflow using Unsafe index scale are jdk.incubator.vector.XXXVector, and they are all explicitly converted to long type. Can we not change it yet?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/22095#issuecomment-2476627886


More information about the core-libs-dev mailing list