RFR: JDK-8282798 java.lang.runtime.Carrier [v4]
Jim Laskey
jlaskey at openjdk.java.net
Fri Mar 11 15:17:32 UTC 2022
On Thu, 10 Mar 2022 22:53:39 GMT, Jim Laskey <jlaskey at openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/runtime/Carrier.java line 346:
>>
>>> 344: * Carrier for longs and integers.
>>> 345: */
>>> 346: private final int[] integers;
>>
>> I believe (@rose00 correct me if I'm wrong) that an `int[]` doesn't guarantee proper 64-but alignment of the first element in the array in 32-bit platforms. We ran into similar issues with the MemorySegment API, I believe. I think using a `long[]` if you want explicit 64-bit alignment is the safest choice.
>
> Makes sense. Easy change.
Done
-------------
PR: https://git.openjdk.java.net/jdk/pull/7744
More information about the core-libs-dev
mailing list