[8u] RFR 8190753: (zipfs): Accessing a large entry (> 2^31 bytes) leads to a negative initial size for ByteArrayOutputStream
Alexey Pavlyutkin
apavlyutkin at azul.com
Thu Nov 25 12:23:17 UTC 2021
Bug: https://bugs.openjdk.java.net/browse/JDK-8190753
Patch: https://github.com/openjdk/jdk/commit/c3d8e9228d0558a2ce3e093c105c61ea7af2e1d1
I would like to backport this patch to openjdk8u (the issue was initially raised exactly against 8)
The following changes done to the original patch for 8u
1. eliminated using of unsupported instanceof pattern match feature
2. changes to absent DeflatingEntryOutputStream class were skipped (in 8 EntryOutputStream handles both RAW and deflating streaming)
3. tests were updated to not use unsupported APIs like Path.of(), Map.of(), etc.
8u webrev: http://cr.openjdk.java.net/~yan/8190753/webrev.00/
Verified with with accompanying
./jdk/test/demo/zipfs/LargeCompressedEntrySizeTest.java
./jdk/test/demo/zipfs/ZipFSOutputStreamTest.java
Regression: jdk:tier2
Thank you,
Alex
More information about the jdk8u-dev
mailing list