[jdk8u-dev] RFR: 8186464: ZipFile cannot read some InfoZip ZIP64 zip files
Andrew John Hughes
andrew at openjdk.org
Tue Feb 20 20:45:17 UTC 2024
This is a re-do of #445 as we reached a deadlock where I could not make myself commit author, as I was not the PR author, and Thomas could not make me the author as he was not a Committer (see [SKARA-2173](https://bugs.openjdk.org/browse/SKARA-2173)). The content remains the same.
What follows is Thomas' introduction from the original PR:
This patch was applied to the Red Hat 1.8.0 RPMs in June 2020, so it has been deployed to Red Hat customers for over three years.
I verified that the patch applies cleanly to jdk8u-dev master. I confirmed that with the fix portion of the patch reverted, the ReadZip.java test portion of the patch produces this exception:
~~~
java.lang.RuntimeException: zipfile: zip64 end failed
at ReadZip.main(ReadZip.java:209)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.lang.Thread.run(Thread.java:750)
~~~
With the fix applied the test passes:
~~~
Passed: java/util/zip/ZipFile/ReadZip.java
~~~
With the patch applied on top of jdk8u-dev master tip, 3dc011b7ff955f6c1334058f300708412b21a3ad, `make test` on Fedora 38 x86-64 passes, with:
~~~
Test results: passed: 3,122
~~~
I also retested the test cases in [JDK-8186464](https://bugs.openjdk.org/browse/JDK-8186464) and confirmed that without this backport, they fail, and with the backport they succeed.
Thank you,
Thomas
-------------
Commit messages:
- zip_util.c: Hoist end64buf to avoid Windows x86 error C2143
- Fix whitespace issues reported by jcheck
- Backport 02b9452ed39eccdfe3210e65b17d4759333c0f15
Changes: https://git.openjdk.org/jdk8u-dev/pull/452/files
Webrev: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=452&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8186464
Stats: 120 lines in 3 files changed: 82 ins; 2 del; 36 mod
Patch: https://git.openjdk.org/jdk8u-dev/pull/452.diff
Fetch: git fetch https://git.openjdk.org/jdk8u-dev.git pull/452/head:pull/452
PR: https://git.openjdk.org/jdk8u-dev/pull/452
More information about the jdk8u-dev
mailing list