Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v9]

2023-12-21 Thread Eirik Bjorsnos
byte values. > > > While small Zip64 files with 8-byte data descriptors are not commonly found > in the wild, it is possible to create one using the Info-ZIP command line > `-fd` flag: > > `echo hello | zip -fd > hello.zip` > > The PR also adds a test verifying tha

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files

2023-12-21 Thread Eirik Bjorsnos
On Sun, 12 Feb 2023 17:04:51 GMT, Alan Bateman wrote: >> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the >> number of compressed or uncompressed bytes read from the inflater is larger >> than the Zip64 magic value. >> >> While the ZIP format mandates that the data

Re: RFR: 8321616: Retire binary test vectors in test/jdk/java/util/zip/ZipFile [v8]

2023-12-20 Thread Eirik Bjorsnos
some comments to help understanding. > > `ReadAfterClose.java` > This uses the binary test vector `crash.jar`. The test is converted to JUnit > and moved to `ReadZip.readAfterClose´. The test is expanded to exercise more > read methods. Eirik Bjorsnos has updated the pull request with a

RFR: 8322565 (zipfs) Files.setPosixPermissions should preserve 'external file attributes' bits

2023-12-20 Thread Eirik Bjorsnos
This PR suggests that `Files.setPosixPermissions`as implemented by `ZipFileSystem` should preserve the leading seven bits of the 'external file attributes' field. These bits contain the 'file type', 'setuid', 'setgid', and 'sticky' bits. These are unrelated to permissions and should not be

Re: RFR: 7036144: GZIPInputStream readTrailer uses faulty available() test for end-of-stream [v4]

2023-12-17 Thread Eirik Bjorsnos
On Fri, 15 Dec 2023 21:13:07 GMT, Archie Cobbs wrote: >> `GZIPInputStream`, when looking for a concatenated stream, relies on what >> the underlying `InputStream` says is how many bytes are `available()`. But >> this is inappropriate because `InputStream.available()` is just an estimate >>

Re: RFR: 7036144: GZIPInputStream readTrailer uses faulty available() test for end-of-stream [v3]

2023-12-15 Thread Eirik Bjorsnos
On Fri, 15 Dec 2023 16:30:01 GMT, Archie Cobbs wrote: >> `GZIPInputStream`, when looking for a concatenated stream, relies on what >> the underlying `InputStream` says is how many bytes are `available()`. But >> this is inappropriate because `InputStream.available()` is just an estimate >>

Re: RFR: 7036144: GZIPInputStream readTrailer uses faulty available() test for end-of-stream [v2]

2023-12-15 Thread Eirik Bjorsnos
On Fri, 15 Dec 2023 03:20:01 GMT, Archie Cobbs wrote: >> `GZIPInputStream`, when looking for a concatenated stream, relies on what >> the underlying `InputStream` says is how many bytes are `available()`. But >> this is inappropriate because `InputStream.available()` is just an estimate >>

Re: RFR: 7036144: GZIPInputStream readTrailer uses faulty available() test for end-of-stream

2023-12-14 Thread Eirik Bjorsnos
On Thu, 14 Dec 2023 20:15:39 GMT, Archie Cobbs wrote: > `GZIPInputStream`, when looking for a concatenated stream, relies on what the > underlying `InputStream` says is how many bytes are `available()`. But this > is inappropriate because `InputStream.available()` is just an estimate and is >

Re: RFR: 7036144: GZIPInputStream readTrailer uses faulty available() test for end-of-stream

2023-12-14 Thread Eirik Bjorsnos
On Thu, 14 Dec 2023 20:15:39 GMT, Archie Cobbs wrote: > `GZIPInputStream`, when looking for a concatenated stream, relies on what the > underlying `InputStream` says is how many bytes are `available()`. But this > is inappropriate because `InputStream.available()` is just an estimate and is >

Re: RFR: 8321616: Retire binary test vectors ZipFile/input.jar and ZipFile/input.zip [v7]

2023-12-14 Thread Eirik Bjorsnos
On Thu, 14 Dec 2023 14:55:08 GMT, Eirik Bjorsnos wrote: >> This PR suggests we retire the binary test vectors `ZipFile/input.zip` and >> `ZipFile/input.jar`. >> >> Binary test vectors are harder to analyze, and sharing test vectors across >> unrelated test

Re: RFR: 8321616: Retire binary test vectors ZipFile/input.jar and ZipFile/input.zip [v7]

2023-12-14 Thread Eirik Bjorsnos
> Nothing exciting, tried to add some comment to help understanding of what is > tested. > > `StreamZipEntriesTest.java` > This test was using TestNG so was converted to JUnit for consistency. Added > some comments to help understanding. Eirik Bjorsnos has updated

Re: RFR: 8321616: Retire binary test vectors ZipFile/input.jar and ZipFile/input.zip [v6]

2023-12-14 Thread Eirik Bjorsnos
ent to help understanding of what is > tested. > > `StreamZipEntriesTest.java` > This test was using TestNG so was converted to JUnit for consistency. Added > some comments to help understanding. Eirik Bjorsnos has updated the pull request incrementally with one additional commit since the

Re: RFR: 8321616: Retire binary test vectors ZipFile/input.jar and ZipFile/input.zip [v5]

2023-12-14 Thread Eirik Bjorsnos
etter to remove `GetDirEntry.java` to reduce duplication? > > `ReadZip.java` > Nothing exciting here, the single main method was split into multiple JUnit > methods, each focusing on a separate concern. > > `ReleaseInflater.java` > Nothing exciting, tried to add

Re: RFR: 8321616: Retire binary test vectors ZipFile/input.jar and ZipFile/input.zip

2023-12-14 Thread Eirik Bjorsnos
On Thu, 14 Dec 2023 11:39:22 GMT, Lance Andersen wrote: > (though CopyZipFile could use a junit conversion ;-) Agreed, I have included that conversion in this PR :-) This test can make good use of `assertThrows` and splitting different concerns into separate test methods. - PR

Re: RFR: 8321616: Retire binary test vectors ZipFile/input.jar and ZipFile/input.zip [v4]

2023-12-14 Thread Eirik Bjorsnos
etter to remove `GetDirEntry.java` to reduce duplication? > > `ReadZip.java` > Nothing exciting here, the single main method was split into multiple JUnit > methods, each focusing on a separate concern. > > `ReleaseInflater.java` > Nothing exciting, tried to add

Re: RFR: 8321616: Retire binary test vectors ZipFile/input.jar and ZipFile/input.zip

2023-12-14 Thread Eirik Bjorsnos
On Thu, 14 Dec 2023 11:39:22 GMT, Lance Andersen wrote: >> The scope of this PR has now expanded to removing uses of the `input.zip` >> and `input.jar` files, updating any test using them to produce their own >> test vectors, and convert affected tests to JUnit. >> >> I'm marking the PR ready

Re: RFR: 8321616: Retire binary test vectors ZipFile/input.jar and ZipFile/input.zip [v3]

2023-12-14 Thread Eirik Bjorsnos
etter to remove `GetDirEntry.java` to reduce duplication? > > `ReadZip.java` > Nothing exciting here, the single main method was split into multiple JUnit > methods, each focusing on a separate concern. > > `ReleaseInflater.java` > Nothing exciting, tried to add

Re: RFR: 8321616: Retire binary test vectors ZipFile/input.jar and ZipFile/input.zip [v2]

2023-12-14 Thread Eirik Bjorsnos
etter to remove `GetDirEntry.java` to reduce duplication? > > `ReadZip.java` > Nothing exciting here, the single main method was split into multiple JUnit > methods, each focusing on a separate concern. > > `ReleaseInflater.java` > Nothing exciting, tried to add some commen

Re: RFR: 8321616: Retire binary test vectors ZipFile/input.jar and ZipFile/input.zip

2023-12-14 Thread Eirik Bjorsnos
On Fri, 8 Dec 2023 20:28:20 GMT, Eirik Bjorsnos wrote: > This PR suggests we retire the binary test vectors `ZipFile/input.zip` and > `ZipFile/input.jar`. > > Binary test vectors are harder to analyze, and sharing test vectors across > unrelated tests increases maintenance b

Re: RFR: 8317678: Fix up hashCode() for ZipFile.Source.Key [v11]

2023-12-13 Thread Eirik Bjorsnos
On Mon, 23 Oct 2023 16:12:45 GMT, Sean Coffey wrote: >> Fix up java.util.zip.ZipFile$Source hashCode() impl so that duplicate Source >> objects aren't created for the same zip file. > > Sean Coffey has updated the pull request incrementally with one additional > commit since the last revision:

Re: RFR: JDK-8319626: Override toString() for ZipFile [v8]

2023-12-13 Thread Eirik Bjorsnos
On Wed, 13 Dec 2023 20:53:17 GMT, Justin Lu wrote: > > I'm seeing the `ZipSourceCache` fail on GHA on `windows-x64`: > > Hi Eirik, > > Please let me know if I'm misunderstanding, I claim `TooManyOpenTabsException` :-) Sorry, this comment was for #16115 - PR Comment:

Re: RFR: JDK-8319626: Override toString() for ZipFile [v8]

2023-12-13 Thread Eirik Bjorsnos
On Mon, 11 Dec 2023 05:47:33 GMT, Justin Lu wrote: >> Please review this PR and [CSR](https://bugs.openjdk.org/browse/JDK-8319982) >> which overrides and provides an implementation of `toString()` in >> _java.util.zip.ZipFile_ (and by extension, _java.util.jar.JarFile_). > > Justin Lu has

Re: RFR: 8321802: (zipfs) Add validation of incorrect LOC signature in ZipFileSystem [v2]

2023-12-12 Thread Eirik Bjorsnos
On Tue, 12 Dec 2023 11:47:35 GMT, Lance Andersen wrote: >> Eirik Bjorsnos has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Use uppercase LOC in ZipException messages > > src/jdk.zipfs/share/classes/jdk/nio

Re: RFR: 8321802: (zipfs) Add validation of incorrect LOC signature in ZipFileSystem [v2]

2023-12-12 Thread Eirik Bjorsnos
to `ZipFileSystem` as well. Eirik Bjorsnos has updated the pull request incrementally with one additional commit since the last revision: Use uppercase LOC in ZipException messages - Changes: - all: https://git.openjdk.org/jdk/pull/17059/files - new: https://git.openjdk.org/jd

RFR: 8321802: (zipfs) Add validation of incorrect LOC signature in ZipFileSystem

2023-12-12 Thread Eirik Bjorsnos
Please review this PR which adds validation of incorrect LOC signatures in `ZipFileSystem`. `ZipFile` already rejects the case where the offset pointed to from the CEN header does not start with the expected LOC signature. It makes sense to add this check to `ZipFileSystem` as well.

Re: RFR: 8321616: Convert the ReadZip test to JUnit

2023-12-11 Thread Eirik Bjorsnos
On Mon, 11 Dec 2023 17:40:24 GMT, Lance Andersen wrote: > I don't have a preference whether we deal with input.jar separately, but > these tests are not that complex so I do not see a risk if they are all > converted at once, or done piece meal Thanks, I'll extend the goal of this PR to

Re: RFR: 8321616: Convert the ReadZip test to JUnit

2023-12-11 Thread Eirik Bjorsnos
On Mon, 11 Dec 2023 16:51:28 GMT, Lance Andersen wrote: > One quick comment, if we are updating this test, we should look to get rid of > input.zip I started going down that road, but felt uneasy about the amount of unrelated changes in a single PR. I'd like to make efficient use of reviewer

RFR: 8321616: Convert the ReadZip test to JUnit

2023-12-11 Thread Eirik Bjorsnos
Please review this PR which suggests we rewrite the `../zip/ZipFile/ReadZip.java` test to JUnit. The current test is a single main method with a sequence of fairly unrelated scenarios. It would benefit from a rewrite to multiple JUnit test methods and some general modernization and

Re: RFR: 8321396: Retire test/jdk/java/util/zip/NoExtensionSignature.java

2023-12-08 Thread Eirik Bjorsnos
On Tue, 5 Dec 2023 15:58:14 GMT, Eirik Bjorsnos wrote: > Please review this PR which suggests we retire the ZIP test > `NoExtensionSignature` along with its `test.jar` test vector. > > The concern of a missing data descriptor signature is covered by the recentl

Re: RFR: 8321396: Retire test/jdk/java/util/zip/NoExtensionSignature.java

2023-12-07 Thread Eirik Bjorsnos
On Thu, 7 Dec 2023 18:14:59 GMT, Lance Andersen wrote: > Eirik, Could you add a reference to [PR > 12959](https://github.com/openjdk/jdk/pull/12959/) or to > [JDK-8303920](https://bugs.openjdk.org/browse/JDK-8303920) in the above Thanks, that makes sense! - PR Comment:

Re: RFR: 8321396: Retire test/jdk/java/util/zip/NoExtensionSignature.java

2023-12-07 Thread Eirik Bjorsnos
On Tue, 5 Dec 2023 15:58:14 GMT, Eirik Bjorsnos wrote: > Please review this PR which suggests we retire the ZIP test > `NoExtensionSignature` along with its `test.jar` test vector. > > The concern of a missing data descriptor signature is covered by the recentl

RFR: 8321396: Retire test/jdk/java/util/zip/NoExtensionSignature.java

2023-12-07 Thread Eirik Bjorsnos
Please review this PR which suggests we retire the ZIP test `NoExtensionSignature` along with its `test.jar` test vector. The concern of a missing data descriptor signature is covered by the recently updated `DataDescriptorSignatureMissing` test. That test is more complete, includes more

RFR: 8321274: Rename ZipEntry.extraAttributes to ZipEntry.externalAttributes

2023-12-04 Thread Eirik Bjorsnos
Please consider this PR which suggests we rename `ZipEntry.extraAttributes` to `ZipEntry.externalAttributes`. This field was introduced in [JDK-8218021](https://bugs.openjdk.org/browse/JDK-8218021), originally under the name `ZipEntry.posixPerms`.

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v8]

2023-12-01 Thread Eirik Bjorsnos
On Wed, 15 Nov 2023 20:10:53 GMT, Eirik Bjorsnos wrote: >> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the >> number of compressed or uncompressed bytes read from the inflater is larger >> than the Zip64 magic value. >> >> While the ZIP

Re: RFR: 8316141: Improve CEN header validation checking

2023-12-01 Thread Eirik Bjorsnos
On Wed, 8 Nov 2023 19:59:34 GMT, Lance Andersen wrote: > Please review this PR which enhances the existing CEN header validation > checking to ensure that the > size of the CEN Header + name length + comment length + extra length do not > exceed 65,535 bytes per the PKWare APP.NOTE 4.4.10,

Re: RFR: 8316141: Improve CEN header validation checking

2023-11-28 Thread Eirik Bjorsnos
On Tue, 28 Nov 2023 20:41:21 GMT, Alan Bateman wrote: > Doing it early in JDK 23 to allow time for course correction if needed seems > a good plan. Another benefit is that if we should decide to validate LOC headers similarly in `ZipInputStream`, delaying until 23 will allow us to introduce

RFR: 8320712: Rewrite BadFactoryTest in pure Java

2023-11-28 Thread Eirik Bjorsnos
Please review this PR which rewrites the BadFactoryTest to pure Java/JUnit. The test is currently implemented using a mix of shell script and a Java main method. Reviewers may notice the following changes: - The shell script file `BadFactoryTest.sh` has been retired and jtreg tags moved over

Re: RFR: 8319668: Fixup of jar filename typo in BadFactoryTest.sh [v2]

2023-11-28 Thread Eirik Bjorsnos
On Mon, 27 Nov 2023 16:45:12 GMT, Gaurav Chaudhari wrote: > You can go ahead and contribute the PR in that case. Thanks! You'll need a sponsor to integrate this PR, then I'll go ahead and follow up with #16830 - PR Comment:

Integrated: 8320781: Fix whitespace in j.l.Double and j.u.z.ZipInputStream @snippets

2023-11-28 Thread Eirik Bjorsnos
On Mon, 27 Nov 2023 16:17:14 GMT, Eirik Bjorsnos wrote: > Please review this trivial, formatting and documentation-only change which > adds missing whitespace around a few `if` statements, `while` statements and > assigments in `@snippet` code in `j.l.Double` and `j.u.z.ZipIn

Re: RFR: 8320781: Fix whitespace in j.l.Double and j.u.z.ZipInputStream @snippets

2023-11-28 Thread Eirik Bjorsnos
On Tue, 28 Nov 2023 10:00:14 GMT, Jaikiran Pai wrote: > Looks good to me. Please add a "noreg-doc" label to the JDK-8320781 issue. Thanks, label added! I'll need a sponsor for the integration of this change. - PR Comment:

RFR: 8320781: Fix whitespace in j.l.Double and j.u.z.ZipInputStream @snippets

2023-11-27 Thread Eirik Bjorsnos
Please review this trivial, formatting and documentation-only change which adds missing whitespace around a few `if` statements, `while` statements and assigments in `@snippet` code in `j.l.Double` and `j.u.z.ZipInputStream`. While there are many similar issues in the OpenJDK code base, these

Re: RFR: 8319668: Fixup of jar filename typo in BadFactoryTest.sh [v2]

2023-11-25 Thread Eirik Bjorsnos
On Fri, 24 Nov 2023 16:46:05 GMT, Alan Bateman wrote: > The change here is trivial, it's okay to integrate and use a separate > issue/PR to replace the shell test. Fair point, I filed https://bugs.openjdk.org/browse/JDK-8320712 to track the rewrite. @Deigue, would you like to contribute a PR

Re: RFR: 8319668: Fixup of jar filename typo in BadFactoryTest.sh [v2]

2023-11-22 Thread Eirik Bjorsnos
On Wed, 22 Nov 2023 18:01:21 GMT, Eirik Bjorsnos wrote: >> @eirbjo Yes, as you noticed, the jar file does matter. And the reason I >> suspected it wasn't noticed was because it was in the scenario of running >> without security manager, So may that part of the code was

Re: RFR: 8319668: Fixup of jar filename typo in BadFactoryTest.sh [v2]

2023-11-22 Thread Eirik Bjorsnos
On Wed, 22 Nov 2023 17:53:33 GMT, Gaurav Chaudhari wrote: > As for the rewrite, it does look good. But would it make more sense to bring > this change as a separate PR having a own openjdk bug issue # designated to > reworking of BadFactoryTest.sh for tracking purposes? We have two options:

Re: RFR: 8319668: Fixup of jar filename typo in BadFactoryTest.sh

2023-11-22 Thread Eirik Bjorsnos
On Tue, 21 Nov 2023 19:59:16 GMT, Gaurav Chaudhari wrote: >> Looks okay. This test is begging to be re-written in Java, maybe some day. >> >> I assume the copyright header will be updated before this change is >> integrated. > >> Looks okay. This test is begging to be re-written in Java, maybe

Re: RFR: 8319668: Fixup of jar filename typo in BadFactoryTest.sh

2023-11-22 Thread Eirik Bjorsnos
On Tue, 21 Nov 2023 21:16:41 GMT, Eirik Bjorsnos wrote: > So it's not clear to me why this test uses a jar file at all, it does not > seem necessary. On a closer look, `${TESTCLASSES}` contains the compiled java classes, but not the service definition file `META-INF/se

Re: RFR: 8319668: Fixup of jar filename typo in BadFactoryTest.sh

2023-11-21 Thread Eirik Bjorsnos
On Thu, 9 Nov 2023 16:49:41 GMT, Gaurav Chaudhari wrote: > The file test/jdk/javax/script/JDK_8196959/BadFactoryTest.sh contains a typo. > When running without security manager, the test references 'badfactoty.jar' > instead of 'badfactory.jar'. This change addresses this by correcting the jar

Re: RFR: 8319668: Fixup of jar filename typo in BadFactoryTest.sh

2023-11-21 Thread Eirik Bjorsnos
On Tue, 21 Nov 2023 16:36:26 GMT, Alan Bateman wrote: >> The file test/jdk/javax/script/JDK_8196959/BadFactoryTest.sh contains a >> typo. When running without security manager, the test references >> 'badfactoty.jar' instead of 'badfactory.jar'. This change addresses this by >> correcting the

Re: RFR: 8316141: Improve CEN header validation checking

2023-11-16 Thread Eirik Bjorsnos
On Thu, 9 Nov 2023 17:22:39 GMT, Lance Andersen wrote: > Regarding you comment about checking whether or not to check if the combined > length of the CEN header + name length + comment length + extra length > 65K > bytes, I chose to add this given the strong wording given this is a really >

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v6]

2023-11-15 Thread Eirik Bjorsnos
On Tue, 14 Nov 2023 11:49:11 GMT, Lance Andersen wrote: >> Eirik Bjorsnos has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add a @bug reference in the test > > src/java.base/share/classes/java/util/zi

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v6]

2023-11-15 Thread Eirik Bjorsnos
On Mon, 13 Nov 2023 19:02:28 GMT, Lance Andersen wrote: >> Eirik Bjorsnos has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add a @bug reference in the test > > test/jdk/java/util/zip/ZipInputStream/Zi

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v8]

2023-11-15 Thread Eirik Bjorsnos
byte values. > > > While small Zip64 files with 8-byte data descriptors are not commonly found > in the wild, it is possible to create one using the Info-ZIP command line > `-fd` flag: > > `echo hello | zip -fd > hello.zip` > > The PR also adds a test verifying tha

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v7]

2023-11-15 Thread Eirik Bjorsnos
byte values. > > > While small Zip64 files with 8-byte data descriptors are not commonly found > in the wild, it is possible to create one using the Info-ZIP command line > `-fd` flag: > > `echo hello | zip -fd > hello.zip` > > The PR also adds a test verifying tha

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v11]

2023-11-15 Thread Eirik Bjorsnos
the last CEN entry, we can reduce required > disk space. > > These speedups reduced the runtime from 4 min 17 sec to 3 seconds on my > Macbook Pro. The produced ZIP size was reduced from 5.7 GB to ~4K. Memory > consumption is down from 8GB to something like 12MB. Eirik Bjorsnos has u

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v10]

2023-11-15 Thread Eirik Bjorsnos
On Wed, 15 Nov 2023 07:41:32 GMT, Jaikiran Pai wrote: > Overall, this is a very good improvement to the test and looks good to me. I > just a have a trivial comment about a typo in a code comment, which I've > added inline. Thanks for your review, Jaikiran! With these latest, comment-only

Integrated: 8303920: Avoid calling out to python in DataDescriptorSignatureMissing test

2023-11-13 Thread Eirik Bjorsnos
On Thu, 9 Mar 2023 19:53:44 GMT, Eirik Bjorsnos wrote: > Please review this PR which brings the DataDescriptorSignatureMissing test > back to life. > > This test currently calls out to Python to create a test vector ZIP with a > Data Descriptor without the recommended but opt

Re: RFR: 8316141: Improve CEN header validation checking

2023-11-08 Thread Eirik Bjorsnos
On Wed, 8 Nov 2023 19:59:34 GMT, Lance Andersen wrote: > Please review this PR which enhances the existing CEN header validation > checking to ensure that the > size of the CEN Header + name length + comment length + extra length do not > exceed 65,535 bytes per the PKWare APP.NOTE 4.4.10,

Re: RFR: 8316141: Improve CEN header validation checking

2023-11-08 Thread Eirik Bjorsnos
On Wed, 8 Nov 2023 19:59:34 GMT, Lance Andersen wrote: > Please review this PR which enhances the existing CEN header validation > checking to ensure that the > size of the CEN Header + name length + comment length + extra length do not > exceed 65,535 bytes per the PKWare APP.NOTE 4.4.10,

Re: RFR: JDK-8295391: Add discussion of binary <-> decimal conversion issues [v3]

2023-11-08 Thread Eirik Bjorsnos
On Wed, 8 Nov 2023 19:24:24 GMT, Joe Darcy wrote: >> Add discussion of some of the common pitfalls related to decimal <-> binary >> conversion. > > Joe Darcy has updated the pull request incrementally with one additional > commit since the last revision: > > Switch to parseFloat from

Re: RFR: 8314891: Additional Zip64 extra header validation [v8]

2023-11-08 Thread Eirik Bjorsnos
On Mon, 23 Oct 2023 19:12:57 GMT, Lance Andersen wrote: >> Please review this PR which improves the Zip64 extra header validation: >> >> - Throw a ZipException If the extra len field is 0 and : >> -- size, csize, or loc offset are set to 0x >> -- disk starting number is set to 0x >>

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v3]

2023-11-08 Thread Eirik Bjorsnos
On Mon, 30 Oct 2023 14:29:41 GMT, Lance Andersen wrote: > > > I think the changes look good overall. Thank you for this. I am not sure > > > that the `@requires` is needed at this point. > > > > > > Was the `@requires (sun.arch.data.model == "64")` added to satisfy the 8GB > > memory

Re: RFR: 8303920: Avoid calling out to python in DataDescriptorSignatureMissing test [v9]

2023-11-08 Thread Eirik Bjorsnos
On Mon, 30 Oct 2023 17:48:48 GMT, Eirik Bjorsnos wrote: >> Please review this PR which brings the DataDescriptorSignatureMissing test >> back to life. >> >> This test currently calls out to Python to create a test vector ZIP with a >> Data Descriptor withou

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v6]

2023-11-08 Thread Eirik Bjorsnos
byte values. > > > While small Zip64 files with 8-byte data descriptors are not commonly found > in the wild, it is possible to create one using the Info-ZIP command line > `-fd` flag: > > `echo hello | zip -fd > hello.zip` > > The PR also adds a test verifying tha

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v5]

2023-11-08 Thread Eirik Bjorsnos
byte values. > > > While small Zip64 files with 8-byte data descriptors are not commonly found > in the wild, it is possible to create one using the Info-ZIP command line > `-fd` flag: > > `echo hello | zip -fd > hello.zip` > > The PR also adds a test verifying tha

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v4]

2023-11-08 Thread Eirik Bjorsnos
On Wed, 8 Nov 2023 13:20:33 GMT, Eirik Bjorsnos wrote: >> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the >> number of compressed or uncompressed bytes read from the inflater is larger >> than the Zip64 magic value. >> >> While the ZIP

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v3]

2023-11-08 Thread Eirik Bjorsnos
On Sat, 28 Oct 2023 17:34:35 GMT, Eirik Bjorsnos wrote: > We need to hold off this PR until #15650 has been integrated as it impacts > some of the changes proposed here Marking this PR ready for review, now that #15650 has been integrated. A summary of updates after

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v4]

2023-11-08 Thread Eirik Bjorsnos
byte values. > > > While small Zip64 files with 8-byte data descriptors are not commonly found > in the wild, it is possible to create one using the Info-ZIP command line > `-fd` flag: > > `echo hello | zip -fd > hello.zip` > > The PR also adds a test verifying tha

Re: RFR: 8303920: Avoid calling out to python in DataDescriptorSignatureMissing test [v9]

2023-11-03 Thread Eirik Bjorsnos
On Fri, 3 Nov 2023 18:43:31 GMT, Lance Andersen wrote: > I can kick of a test run internally next week or perhaps Sunday Thanks for your reviews, Lance and Iris! FWIW, the test ran fine on Github Actions, including on `linux-x86` (which is 32-bit, right?): TEST:

Re: RFR: 8303920: Avoid calling out to python in DataDescriptorSignatureMissing test [v9]

2023-11-02 Thread Eirik Bjorsnos
On Mon, 30 Oct 2023 19:54:12 GMT, Lance Andersen wrote: > Thinking some more about this, I would like to see us keep the Zip generated > by python, store it in a byte array (or equivalent) as it also validate that > we can still process the zip given this was the original test and the zip is

Re: RFR: 8303920: Avoid calling out to python in DataDescriptorSignatureMissing test [v8]

2023-10-30 Thread Eirik Bjorsnos
On Mon, 30 Oct 2023 17:45:28 GMT, Eirik Bjorsnos wrote: >> test/jdk/java/util/zip/DataDescriptorSignatureMissing.java line 3: >> >>> 1: /* >>> 2: * Copyright 2012 Google, Inc. All Rights Reserved. >>> 3: * Copyright (c) 2023, Oracle and/or its affil

Re: RFR: 8303920: Avoid calling out to python in DataDescriptorSignatureMissing test [v8]

2023-10-30 Thread Eirik Bjorsnos
On Mon, 30 Oct 2023 15:02:57 GMT, Lance Andersen wrote: > Another question, is the zip that is generated by this test readable by other > zip tools such as info-zip, Apache Common-compress, winzip? - info-zip: Does not support unzipping from a zip, so uses the CEN instead of the data

Re: RFR: 8303920: Avoid calling out to python in DataDescriptorSignatureMissing test [v9]

2023-10-30 Thread Eirik Bjorsnos
ned out to be very brittle, so the test is currently marked > with `@ignore` > > The PR replaces Python callouts with directly creating the test vector ZIP in > the test itself. We can then remove the `@ignore`tag and run this useful test > automatically. Eirik Bjorsnos has updat

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v7]

2023-10-30 Thread Eirik Bjorsnos
On Mon, 30 Oct 2023 14:28:28 GMT, Lance Andersen wrote: > Please see comments below Big thanks for your review Lance! I think I have addressed your concerns now. > I would suggest a comment to help future developers. I realize there are some > earlier bread crumbs but I think this would be

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v10]

2023-10-30 Thread Eirik Bjorsnos
the last CEN entry, we can reduce required > disk space. > > These speedups reduced the runtime from 4 min 17 sec to 3 seconds on my > Macbook Pro. The produced ZIP size was reduced from 5.7 GB to ~4K. Memory > consumption is down from 8GB to something like 12MB. Eirik Bjorsnos has

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v9]

2023-10-30 Thread Eirik Bjorsnos
the last CEN entry, we can reduce required > disk space. > > These speedups reduced the runtime from 4 min 17 sec to 3 seconds on my > Macbook Pro. The produced ZIP size was reduced from 5.7 GB to ~4K. Memory > consumption is down from 8GB to something like 12MB. Eirik Bjorsnos has

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v7]

2023-10-30 Thread Eirik Bjorsnos
On Mon, 30 Oct 2023 14:10:25 GMT, Lance Andersen wrote: >> Eirik Bjorsnos has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request cont

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v3]

2023-10-30 Thread Eirik Bjorsnos
On Mon, 30 Oct 2023 14:29:41 GMT, Lance Andersen wrote: > > Was the `@requires (sun.arch.data.model == "64")` added to satisfy the 8GB > > memory requirement? If so, I guess we can safely remove the requires tag, > > even though the test still creates a ~2GB sparse file? > > We would have to

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v8]

2023-10-30 Thread Eirik Bjorsnos
the last CEN entry, we can reduce required > disk space. > > These speedups reduced the runtime from 4 min 17 sec to 3 seconds on my > Macbook Pro. The produced ZIP size was reduced from 5.7 GB to ~4K. Memory > consumption is down from 8GB to something like 12MB. Eirik Bjorsnos

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v3]

2023-10-30 Thread Eirik Bjorsnos
On Sun, 12 Mar 2023 11:21:18 GMT, Eirik Bjorsnos wrote: > I think the changes look good overall. Thank you for this. I am not sure that > the `@requires` is needed at this point. Was the `@requires (sun.arch.data.model == "64")` added to satisfy the 8GB memory requirement? I

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v3]

2023-10-30 Thread Eirik Bjorsnos
On Sun, 12 Mar 2023 14:12:08 GMT, Lance Andersen wrote: >> Eirik Bjorsnos has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Use Integer.toString instead of Long.toString > >> Here's a wild idea: >>

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v7]

2023-10-30 Thread Eirik Bjorsnos
runtime from 4 min 17 sec to 4 seconds on my > Macbook Pro. The produced ZIP size was reduced from 5.7 GB to 2 GB. Memory > consumption is down from 8GB to something like 12MB. Eirik Bjorsnos has updated the pull request with a new target base due to a merge or a rebase. The incremental web

Re: RFR: 8303920: Avoid calling out to python in DataDescriptorSignatureMissing test [v8]

2023-10-28 Thread Eirik Bjorsnos
On Sat, 28 Oct 2023 20:01:56 GMT, Eirik Bjorsnos wrote: >> Please review this PR which brings the DataDescriptorSignatureMissing test >> back to life. >> >> This test currently calls out to Python to create a test vector ZIP with a >> Data Descriptor withou

Re: RFR: 8303920: Avoid calling out to python in DataDescriptorSignatureMissing test [v8]

2023-10-28 Thread Eirik Bjorsnos
ned out to be very brittle, so the test is currently marked > with `@ignore` > > The PR replaces Python callouts with directly creating the test vector ZIP in > the test itself. We can then remove the `@ignore`tag and run this useful test > automatically. Eirik Bjorsnos has updated t

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v3]

2023-10-28 Thread Eirik Bjorsnos
On Sat, 28 Oct 2023 17:08:07 GMT, Eirik Bjorsnos wrote: >> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the >> number of compressed or uncompressed bytes read from the inflater is larger >> than the Zip64 magic value. >> >> While the ZIP

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v3]

2023-10-28 Thread Eirik Bjorsnos
On Sat, 28 Oct 2023 17:08:07 GMT, Eirik Bjorsnos wrote: >> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the >> number of compressed or uncompressed bytes read from the inflater is larger >> than the Zip64 magic value. >> >> While the ZIP

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v3]

2023-10-28 Thread Eirik Bjorsnos
byte values. > > > While small Zip64 files with 8-byte data descriptors are not commonly found > in the wild, it is possible to create one using the Info-ZIP command line > `-fd` flag: > > `echo hello | zip -fd > hello.zip` > > The PR also adds a test verifying tha

Re: RFR: 8317742: ISO Starndard Date Format implementation consistency on DateTimeFormatter and String.format [v2]

2023-10-16 Thread Eirik Bjorsnos
On Thu, 12 Oct 2023 06:01:41 GMT, Shaojin Wen wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> No longer localize printed numbers > > # Summary > Keep the behavior of String.format('%tF') when printing LocalDate

Re: RFR: 8318072: DonwcallLinker does not acquire/release segments in interpreter

2023-10-13 Thread Eirik Bjorsnos
On Fri, 13 Oct 2023 08:00:07 GMT, Jorn Vernee wrote: > Implement missing by-reference argument acquire/release functionality in > DowncallLinker::invokeInterpBindings. > > I've also simplified the related code a bit: > - `retIndexMap` was not used. I've removed it > -

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v2]

2023-08-16 Thread Eirik Bjorsnos
On Tue, 15 Aug 2023 15:39:37 GMT, Lance Andersen wrote: >> I think I agree with Volker that it would be better if >> isZip64ExtBlockSizeValid continued to return false for block size 0. > > OK, I have made the suggest change that you both prefer. > > Thank you for your input I'm also happy to

Re: RFR: 8309632: JDK 21 RDP1 L10n resource files update

2023-06-15 Thread Eirik Bjorsnos
On Mon, 12 Jun 2023 21:21:05 GMT, Justin Lu wrote: > Please review this PR which updates the JDK's localized resources since the > previous L10n translation drop (1/26). > > To help with reviewing the changes, @jonathan-gibbons created a tool which > displays the localized changes next to the

Re: RFR: 8309632: JDK 21 RDP1 L10n resource files update

2023-06-12 Thread Eirik Bjorsnos
On Mon, 12 Jun 2023 22:00:01 GMT, Justin Lu wrote: > Please review this PR which updates the JDK's localized resources since the > previous L10n translation drop (1/26). > > To help with reviewing the changes, @jonathan-gibbons created a tool which > displays the localized changes next to the

Re: RFR: 8307088: Allow the jdbc.drivers system property to be searchable

2023-04-28 Thread Eirik Bjorsnos
On Fri, 28 Apr 2023 17:28:47 GMT, Lance Andersen wrote: > Hi all, > > Please review this trivial change which allows the` jdbc.drivers` system > property to be searchable. > > Best. > Lance Somewhat unrelated perhaps, but I found the example value given for `jdbc.drivers` in `DriverManager`

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v2]

2023-04-18 Thread Eirik Bjorsnos
On Tue, 18 Apr 2023 18:19:20 GMT, Lance Andersen wrote: > It would be useful to obtain the zip/jar in question to validate that your > proposed patch addresses the issue as well as verifying if ZipfFile can be > used to process the zip/jar as reading the long thread appears that >

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v2]

2023-04-18 Thread Eirik Bjorsnos
On Tue, 18 Apr 2023 18:19:20 GMT, Lance Andersen wrote: > Do you know how the Zip in question is being created, is it via ApacheCommons > and could there be an issue there? Currently investigating. The Tomcat build is using the Ant `jar` task to create the `tomcat-embed-core.jar`, but then

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v2]

2023-04-18 Thread Eirik Bjorsnos
On Wed, 29 Mar 2023 10:48:57 GMT, Eirik Bjorsnos wrote: >> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the >> number of compressed or uncompressed bytes read from the inflater is larger >> than the Zip64 magic value. >> >> While the ZIP

Re: RFR: 8305945: (zipfs) Opening a directory to get input stream produces incorrect exception message [v5]

2023-04-17 Thread Eirik Bjorsnos
On Mon, 17 Apr 2023 17:04:32 GMT, Alan Bateman wrote: > What you have is fine, I'm just making the point that the exception message > is somewhat secondary I guess this is also a question of testing the interface vs. testing the implementation. To get good coverage of validation scenarios, I

Integrated: 8306036: Use @apiNote in String.toLowerCase, String.toUpperCase

2023-04-16 Thread Eirik Bjorsnos
On Sat, 15 Apr 2023 07:56:17 GMT, Eirik Bjorsnos wrote: > Please review this PR which suggests to use `@apiNote` in the > `String.toLowerCase()` and `String.toUpperCase()` API docs. > > These methods include important usage notes which today are encoded using > `Note:`. This p

Re: RFR: 8306036: Use @apiNote in String.toLowerCase, String.toUpperCase [v2]

2023-04-16 Thread Eirik Bjorsnos
On Sat, 15 Apr 2023 11:17:34 GMT, Eirik Bjorsnos wrote: >> Please review this PR which suggests to use `@apiNote` in the >> `String.toLowerCase()` and `String.toUpperCase()` API docs. >> >> These methods include important usage notes which today are encoded usin

Re: RFR: 8306036: Use @apiNote in String.toLowerCase, String.toUpperCase [v2]

2023-04-15 Thread Eirik Bjorsnos
On Sat, 15 Apr 2023 19:09:34 GMT, Alan Bateman wrote: > There may be a few like this around the JDK that pre-date the apiNote tag. There are 44 matches in 12 files in `src/java.base/share/classes/java`, including classes such as `HttpURLConnection`, `Character`, `SimpleDateFormat`, `Locale`

Re: RFR: 8305461: [vectorapi] Add VectorMask::xor

2023-04-15 Thread Eirik Bjorsnos
On Thu, 6 Apr 2023 03:43:26 GMT, Quan Anh Mai wrote: >> Thank you for doing this. I am guessing it was always intended to be public >> but was not spotted in previous reviews. > > @PaulSandoz Thanks for your timely review, do I need a second review for this > patch? Hello @merykitty, I'm

  1   2   3   4   5   >