Re: RFR: 8193682: Infinite loop in ZipOutputStream.close() [v13]
On Thu, 18 Nov 2021 19:09:18 GMT, Ravi Reddy wrote: >> Hi all, >> >> Please review this fix for Infinite loop in ZipOutputStream.close(). >> The main issue here is when ever there is an exception during close >> operations on GZip we are not setting the deflator to a finished state which >> is leading to an infinite loop when we try writing on the same GZip >> instance( since we use while(!def.finished()) inside the write operation). >> >> Thanks, >> Ravi > > Ravi Reddy has updated the pull request incrementally with one additional > commit since the last revision: > > Added ZipException case to handle failure CopyZipFile.java - Only close the > deflater incase of IOException not in ZipException case scenario could you move the test up one directory to java/util/zip ? I don't think it's particular to GZIP any longer. Also perhaps a rename to something like CloseDeflaterTest etc. - PR: https://git.openjdk.java.net/jdk/pull/5522
Re: RFR: 8193682: Infinite loop in ZipOutputStream.close() [v13]
On Thu, 18 Nov 2021 19:09:18 GMT, Ravi Reddy wrote: >> Hi all, >> >> Please review this fix for Infinite loop in ZipOutputStream.close(). >> The main issue here is when ever there is an exception during close >> operations on GZip we are not setting the deflator to a finished state which >> is leading to an infinite loop when we try writing on the same GZip >> instance( since we use while(!def.finished()) inside the write operation). >> >> Thanks, >> Ravi > > Ravi Reddy has updated the pull request incrementally with one additional > commit since the last revision: > > Added ZipException case to handle failure CopyZipFile.java - Only close the > deflater incase of IOException not in ZipException case scenario Hi All, In the latest commit, I have resolved an issue in the case of ZipException in ZipOutputStream.closeEntry(). Now close the deflater in ZipOutputStream.closeEntry() only in case of an IOException and not with ZipException. Mach5 is green : https://mach5.us.oracle.com/mdash/jobs?search=id:rreddy-jdk-2028-1708-26358737 Thanks, Ravi - PR: https://git.openjdk.java.net/jdk/pull/5522
Re: RFR: 8193682: Infinite loop in ZipOutputStream.close() [v13]
> Hi all, > > Please review this fix for Infinite loop in ZipOutputStream.close(). > The main issue here is when ever there is an exception during close > operations on GZip we are not setting the deflator to a finished state which > is leading to an infinite loop when we try writing on the same GZip instance( > since we use while(!def.finished()) inside the write operation). > > Thanks, > Ravi Ravi Reddy has updated the pull request incrementally with one additional commit since the last revision: Added ZipException case to handle failure CopyZipFile.java - Only close the deflater incase of IOException not in ZipException case scenario - Changes: - all: https://git.openjdk.java.net/jdk/pull/5522/files - new: https://git.openjdk.java.net/jdk/pull/5522/files/d9112977..47697f96 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk=5522=12 - incr: https://webrevs.openjdk.java.net/?repo=jdk=5522=11-12 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5522.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5522/head:pull/5522 PR: https://git.openjdk.java.net/jdk/pull/5522