RFR: 8345119: Some java/foreign tests wrongly assume aligned memory
Jorn Vernee
jvernee at openjdk.org
Wed Nov 27 16:44:38 UTC 2024
On Wed, 27 Nov 2024 16:12:04 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
> Hi,
>
> This patch resolves some issues I found that the tests wrongly assume sufficient alignment from the segment returned by `Arena::allocate`.
>
> Please take a look and leave your reviews, thanks a lot.
test/jdk/java/foreign/TestByteBuffer.java line 414:
> 412: ByteBuffer bb;
> 413: try (Arena arena = Arena.ofConfined()) {
> 414: MemorySegment segment = arena.allocate(bytes, Long.BYTES);
Why does this segment need to be aligned?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22415#discussion_r1860976974
More information about the core-libs-dev
mailing list