[jdk17u-dev] RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size)
Ben Taylor
btaylor at openjdk.org
Thu Aug 17 18:24:39 UTC 2023
On Thu, 17 Aug 2023 02:16:28 GMT, Ben Taylor <btaylor at openjdk.org> wrote:
> Backport is not clean, required changes:
> - Some context lines
> - Changes to `CorruptedZipFiles.java` had to be altered because [8304014](https://bugs.openjdk.org/browse/JDK-8304014) has not been backported to jdk20
>
> All tests in `test/jdk/java/util/zip` pass
#Test Results (version 2)
#Thu Aug 17 17:49:05 UTC 2023
#-----testdescription-----
$file=/local/home/benty/workspace/github/jdk17u-dev/test/jdk/java/util/zip/ZipFile/ReadNonStandardExtraHeadersTest.java
$root=/local/home/benty/workspace/github/jdk17u-dev/test/jdk
keywords=bug8313765 junit
run=USER_SPECIFIED junit ReadNonStandardExtraHeadersTest\n
source=ReadNonStandardExtraHeadersTest.java
title=Validate that a Zip File with an Extra Header with a data size of 0 can be read.
#-----environment-----
#-----testresult-----
description=file:/local/home/benty/workspace/github/jdk17u-dev/test/jdk/java/util/zip/ZipFile/ReadNonStandardExtraHeadersTest.java
elapsed=2517 0:00:02.517
end=Thu Aug 17 17:49:05 UTC 2023
environment=regtest
execStatus=Passed. Execution successful
harnessLoaderMode=Classpath Loader
harnessVariety=Full Bundle
hostname=<redacted>
javatestOS=Linux 5.4.249-170.359.amzn2int.x86_64 (amd64)
javatestVersion=6.0-ea+b24-2023-08-07-${BUILT_FROM_COMMIT}
jtregVersion=jtreg 7.3 dev 0
script=com.sun.javatest.regtest.exec.RegressionScript
sections=script_messages build compile junit
start=Thu Aug 17 17:49:02 UTC 2023
test=java/util/zip/ZipFile/ReadNonStandardExtraHeadersTest.java
testJDK=/local/home/benty/workspace/github/jdk17u-dev/build/linux-x86_64-server-release/jdk
testJDK_OS=[name:Linux,arch:amd64,version:5.4.249-170.359.amzn2int.x86_64,family:linux,simple_arch:x64,simple_version:5.4,processors:16,maxMemory:128708317184,maxSwap:0]
testJDK_os.arch=amd64
testJDK_os.name=Linux
testJDK_os.version=5.4.249-170.359.amzn2int.x86_64
totalTime=2530
user.name=benty
work=/local/home/benty/workspace/github/jdk17u-dev/JTwork/java/util/zip/ZipFile
#section:script_messages
----------messages:(4/308)----------
JDK under test: /local/home/benty/workspace/github/jdk17u-dev/build/linux-x86_64-server-release/jdk
openjdk version "17.0.9-internal" 2023-10-17
OpenJDK Runtime Environment (build 17.0.9-internal+0-adhoc.benty.jdk17u-dev)
OpenJDK 64-Bit Server VM (build 17.0.9-internal+0-adhoc.benty.jdk17u-dev, mixed mode)
#section:build
----------messages:(7/252)----------
command: build ReadNonStandardExtraHeadersTest
reason: Named class compiled on demand
started: Thu Aug 17 17:49:02 UTC 2023
Test directory:
compile: ReadNonStandardExtraHeadersTest
finished: Thu Aug 17 17:49:04 UTC 2023
elapsed time (seconds): 1.106
result: Passed. Build successful
#section:compile
----------messages:(7/314)----------
command: compile /local/home/benty/workspace/github/jdk17u-dev/test/jdk/java/util/zip/ZipFile/ReadNonStandardExtraHeadersTest.java
reason: .class file out of date or does not exist
started: Thu Aug 17 17:49:02 UTC 2023
Mode: agentvm
Agent id: 4
finished: Thu Aug 17 17:49:04 UTC 2023
elapsed time (seconds): 1.106
----------configuration:(11/716)----------
Boot Layer (javac runtime environment)
class path: /local/home/benty/jtreg/7.3.1/jtreg/lib/javatest.jar
/local/home/benty/jtreg/7.3.1/jtreg/lib/jtreg.jar
patch: java.base /local/home/benty/workspace/github/jdk17u-dev/JTwork/patches/java.base
javac compilation environment
source path: /local/home/benty/workspace/github/jdk17u-dev/test/jdk/java/util/zip/ZipFile
class path: /local/home/benty/workspace/github/jdk17u-dev/test/jdk/java/util/zip/ZipFile
/local/home/benty/workspace/github/jdk17u-dev/JTwork/classes/1/java/util/zip/ZipFile/ReadNonStandardExtraHeadersTest.d
/local/home/benty/jtreg/7.3.1/jtreg/lib/junit-platform-console-standalone-1.9.2.jar
----------rerun:(28/2484)*----------
cd /local/home/benty/workspace/github/jdk17u-dev/JTwork/scratch/6 && \\
HOME=/home/benty \\
LANG=en_US.UTF-8 \\
PATH=/bin:/usr/bin:/usr/sbin \\
XDG_RUNTIME_DIR=/run/user/4923612 \\
XDG_SESSION_ID=84863 \\
/local/home/benty/workspace/github/jdk17u-dev/build/linux-x86_64-server-release/jdk/bin/javac \\
-J-ea \\
-J-esa \\
-J-Xmx1024m \\
-J-Dtest.vm.opts='-ea -esa -Xmx1024m' \\
-J-Dtest.tool.vm.opts='-J-ea -J-esa -J-Xmx1024m' \\
-J-Dtest.compiler.opts= \\
-J-Dtest.java.opts= \\
-J-Dtest.jdk=/local/home/benty/workspace/github/jdk17u-dev/build/linux-x86_64-server-release/jdk \\
-J-Dcompile.jdk=/local/home/benty/workspace/github/jdk17u-dev/build/linux-x86_64-server-release/jdk \\
-J-Dtest.timeout.factor=8.0 \\
-J-Dtest.root=/local/home/benty/workspace/github/jdk17u-dev/test/jdk \\
-J-Dtest.name=java/util/zip/ZipFile/ReadNonStandardExtraHeadersTest.java \\
-J-Dtest.file=/local/home/benty/workspace/github/jdk17u-dev/test/jdk/java/util/zip/ZipFile/ReadNonStandardExtraHeadersTest.java \\
-J-Dtest.src=/local/home/benty/workspace/github/jdk17u-dev/test/jdk/java/util/zip/ZipFile \\
-J-Dtest.src.path=/local/home/benty/workspace/github/jdk17u-dev/test/jdk/java/util/zip/ZipFile \\
-J-Dtest.classes=/local/home/benty/workspace/github/jdk17u-dev/JTwork/classes/1/java/util/zip/ZipFile/ReadNonStandardExtraHeadersTest.d \\
-J-Dtest.class.path=/local/home/benty/workspace/github/jdk17u-dev/JTwork/classes/1/java/util/zip/ZipFile/ReadNonStandardExtraHeadersTest.d \\
-J-Dtest.class.path.prefix=/local/home/benty/workspace/github/jdk17u-dev/JTwork/classes/1/java/util/zip/ZipFile/ReadNonStandardExtraHeadersTest.d:/local/home/benty/workspace/github/jdk17u-dev/test/jdk/java/util/zip/ZipFile \\
-d /local/home/benty/workspace/github/jdk17u-dev/JTwork/classes/1/java/util/zip/ZipFile/ReadNonStandardExtraHeadersTest.d \\
-sourcepath /local/home/benty/workspace/github/jdk17u-dev/test/jdk/java/util/zip/ZipFile \\
-classpath /local/home/benty/workspace/github/jdk17u-dev/test/jdk/java/util/zip/ZipFile:/local/home/benty/workspace/github/jdk17u-dev/JTwork/classes/1/java/util/zip/ZipFile/ReadNonStandardExtraHeadersTest.d:/local/home/benty/jtreg/7.3.1/jtreg/lib/junit-platform-console-standalone-1.9.2.jar /local/home/benty/workspace/github/jdk17u-dev/test/jdk/java/util/zip/ZipFile/ReadNonStandardExtraHeadersTest.java
result: Passed. Compilation successful
#section:junit
----------messages:(7/254)----------
command: junit ReadNonStandardExtraHeadersTest
reason: User specified action: run junit ReadNonStandardExtraHeadersTest
started: Thu Aug 17 17:49:04 UTC 2023
Mode: agentvm
Agent id: 8
finished: Thu Aug 17 17:49:05 UTC 2023
elapsed time (seconds): 1.405
----------configuration:(13/793)----------
Boot Layer
class path: /local/home/benty/jtreg/7.3.1/jtreg/lib/javatest.jar
/local/home/benty/jtreg/7.3.1/jtreg/lib/jtreg.jar
/local/home/benty/jtreg/7.3.1/jtreg/lib/junit-platform-console-standalone-1.9.2.jar
/local/home/benty/jtreg/7.3.1/jtreg/lib/testng-7.3.0.jar
/local/home/benty/jtreg/7.3.1/jtreg/lib/guice-5.1.0.jar
/local/home/benty/jtreg/7.3.1/jtreg/lib/jcommander-1.82.jar
patch: java.base /local/home/benty/workspace/github/jdk17u-dev/JTwork/patches/java.base
Test Layer
class path: /local/home/benty/workspace/github/jdk17u-dev/JTwork/classes/1/java/util/zip/ZipFile/ReadNonStandardExtraHeadersTest.d
/local/home/benty/workspace/github/jdk17u-dev/test/jdk/java/util/zip/ZipFile
----------rerun:(24/2296)*----------
cd /local/home/benty/workspace/github/jdk17u-dev/JTwork/scratch/6 && \\
HOME=/home/benty \\
LANG=en_US.UTF-8 \\
PATH=/bin:/usr/bin:/usr/sbin \\
XDG_RUNTIME_DIR=/run/user/4923612 \\
XDG_SESSION_ID=84863 \\
/local/home/benty/workspace/github/jdk17u-dev/build/linux-x86_64-server-release/jdk/bin/java \\
-Dtest.vm.opts='-ea -esa -Xmx1024m' \\
-Dtest.tool.vm.opts='-J-ea -J-esa -J-Xmx1024m' \\
-Dtest.compiler.opts= \\
-Dtest.java.opts= \\
-Dtest.jdk=/local/home/benty/workspace/github/jdk17u-dev/build/linux-x86_64-server-release/jdk \\
-Dcompile.jdk=/local/home/benty/workspace/github/jdk17u-dev/build/linux-x86_64-server-release/jdk \\
-Dtest.timeout.factor=8.0 \\
-Dtest.root=/local/home/benty/workspace/github/jdk17u-dev/test/jdk \\
-Dtest.name=java/util/zip/ZipFile/ReadNonStandardExtraHeadersTest.java \\
-Dtest.file=/local/home/benty/workspace/github/jdk17u-dev/test/jdk/java/util/zip/ZipFile/ReadNonStandardExtraHeadersTest.java \\
-Dtest.src=/local/home/benty/workspace/github/jdk17u-dev/test/jdk/java/util/zip/ZipFile \\
-Dtest.src.path=/local/home/benty/workspace/github/jdk17u-dev/test/jdk/java/util/zip/ZipFile \\
-Dtest.classes=/local/home/benty/workspace/github/jdk17u-dev/JTwork/classes/1/java/util/zip/ZipFile/ReadNonStandardExtraHeadersTest.d \\
-Dtest.class.path=/local/home/benty/workspace/github/jdk17u-dev/JTwork/classes/1/java/util/zip/ZipFile/ReadNonStandardExtraHeadersTest.d \\
-Dtest.class.path.prefix=/local/home/benty/workspace/github/jdk17u-dev/JTwork/classes/1/java/util/zip/ZipFile/ReadNonStandardExtraHeadersTest.d:/local/home/benty/workspace/github/jdk17u-dev/test/jdk/java/util/zip/ZipFile \\
-classpath /local/home/benty/workspace/github/jdk17u-dev/JTwork/classes/1/java/util/zip/ZipFile/ReadNonStandardExtraHeadersTest.d:/local/home/benty/workspace/github/jdk17u-dev/test/jdk/java/util/zip/ZipFile:/local/home/benty/jtreg/7.3.1/jtreg/lib/junit-platform-console-standalone-1.9.2.jar:/local/home/benty/jtreg/7.3.1/jtreg/lib/javatest.jar:/local/home/benty/jtreg/7.3.1/jtreg/lib/jtreg.jar \\
com.sun.javatest.regtest.agent.JUnitRunner java/util/zip/ZipFile/ReadNonStandardExtraHeadersTest.java ReadNonStandardExtraHeadersTest
----------System.err:(23/1722)----------
STARTED ReadNonStandardExtraHeadersTest::zipFilesToTest '[1] working-apk.zip'
SUCCESSFUL ReadNonStandardExtraHeadersTest::zipFilesToTest '[1] working-apk.zip'
STARTED ReadNonStandardExtraHeadersTest::zipFilesToTest '[2] valid-apache-compress.jar'
SUCCESSFUL ReadNonStandardExtraHeadersTest::zipFilesToTest '[2] valid-apache-compress.jar'
STARTED ReadNonStandardExtraHeadersTest::zipFilesToTest '[3] valid-ant-zip64-unicode-extrafields.jar'
SUCCESSFUL ReadNonStandardExtraHeadersTest::zipFilesToTest '[3] valid-ant-zip64-unicode-extrafields.jar'
STARTED ReadNonStandardExtraHeadersTest::zipFilesToTest '[4] valid-ant-zip64-unicode-extrafields.zip'
SUCCESSFUL ReadNonStandardExtraHeadersTest::zipFilesToTest '[4] valid-ant-zip64-unicode-extrafields.zip'
STARTED ReadNonStandardExtraHeadersTest::readZipFSTest '[1] working-apk.zip'
SUCCESSFUL ReadNonStandardExtraHeadersTest::readZipFSTest '[1] working-apk.zip'
STARTED ReadNonStandardExtraHeadersTest::readZipFSTest '[2] valid-apache-compress.jar'
SUCCESSFUL ReadNonStandardExtraHeadersTest::readZipFSTest '[2] valid-apache-compress.jar'
STARTED ReadNonStandardExtraHeadersTest::readZipFSTest '[3] valid-ant-zip64-unicode-extrafields.jar'
SUCCESSFUL ReadNonStandardExtraHeadersTest::readZipFSTest '[3] valid-ant-zip64-unicode-extrafields.jar'
STARTED ReadNonStandardExtraHeadersTest::readZipFSTest '[4] valid-ant-zip64-unicode-extrafields.zip'
SUCCESSFUL ReadNonStandardExtraHeadersTest::readZipFSTest '[4] valid-ant-zip64-unicode-extrafields.zip'
[ JUnit Containers: found 6, started 6, succeeded 6, failed 0, aborted 0, skipped 0]
[ JUnit Tests: found 8, started 8, succeeded 8, failed 0, aborted 0, skipped 0]
JavaTest Message: Test complete.
----------System.out:(8/804)----------
/local/home/benty/workspace/github/jdk17u-dev/JTwork/scratch/6/working-apk.zip opened
/local/home/benty/workspace/github/jdk17u-dev/JTwork/scratch/6/valid-apache-compress.jar opened
/local/home/benty/workspace/github/jdk17u-dev/JTwork/scratch/6/valid-ant-zip64-unicode-extrafields.jar opened
/local/home/benty/workspace/github/jdk17u-dev/JTwork/scratch/6/valid-ant-zip64-unicode-extrafields.zip opened
/local/home/benty/workspace/github/jdk17u-dev/JTwork/scratch/6/working-apk.zip opened
/local/home/benty/workspace/github/jdk17u-dev/JTwork/scratch/6/valid-apache-compress.jar opened
/local/home/benty/workspace/github/jdk17u-dev/JTwork/scratch/6/valid-ant-zip64-unicode-extrafields.jar opened
/local/home/benty/workspace/github/jdk17u-dev/JTwork/scratch/6/valid-ant-zip64-unicode-extrafields.zip opened
result: Passed. Execution successful
test result: Passed. Execution successful
-------------
PR Comment: https://git.openjdk.org/jdk17u-dev/pull/1670#issuecomment-1682758471
More information about the jdk-updates-dev
mailing list