RFR: 8357145: CRC/Inflater/Deflater/Adler32 methods that take a ByteBuffer throw UOE if backed by shared memory segment
Alan Bateman
alanb at openjdk.org
Wed May 21 14:48:54 UTC 2025
On Tue, 20 May 2025 07:37:34 GMT, Per Minborg <pminborg at openjdk.org> wrote:
> This PR proposes to use ` JavaNioAccess::getBufferAdress` rather than `DirectBuffer::address` in the package `java.util.zip` so that `Buffer` instances backed by `MemorySegment` instances can be used.
>
> This PR passes tier1, tier2, and tier3 tests on multiple platforms and configurations.
test/jdk/java/util/zip/ChecksumBase.java line 79:
> 77: checksum.update(bb);
> 78: checkChecksum(checksum, expected);
> 79: }
The src changes look right. For the tests then I wonder if we could expand to exercise with view of byte buffers on memory segments allocated from all arenas with bounded lifetime. I think that would help the test coverage.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25321#discussion_r2100487463
More information about the core-libs-dev
mailing list