-
Bug
-
Resolution: Fixed
-
P4
-
25
-
None
-
b25
The methods in java.util.zip.{CRC,Inflater,Deflater,Alder32} that accept a ByteBuffer need to be update to deal with a ByteBuffer that is backed by a MemorySegment in a shared arena, e.g. the following throws UOE:
var crc = new CRC32();
try (var arena = Arena.ofShared()) {
ByteBuffer bb = arena.allocate(100).asByteBuffer();
crc.update(bb);
}
In implementation terms, the use of ((DirectBuffer)buffer).address() in these classes need to change to use NIO_ACCESS.getBufferAdress().
var crc = new CRC32();
try (var arena = Arena.ofShared()) {
ByteBuffer bb = arena.allocate(100).asByteBuffer();
crc.update(bb);
}
In implementation terms, the use of ((DirectBuffer)buffer).address() in these classes need to change to use NIO_ACCESS.getBufferAdress().
- relates to
-
JDK-8357268 Use JavaNioAccess.getBufferAddress rather than DirectBuffer.address()
-
- Resolved
-
-
JDK-8357466 Create test for Ciphers that are using ByteBuffers backed by MemorySegments
-
- Open
-
-
JDK-8357919 Arena::allocate returns segments with address zero if the segment length is zero after JDK-8345687
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/da228e06
-
Review(master) openjdk/jdk/25321