RFR: JDK-8197398 (zipfs) OutOfMemoryError when talking contents of empty JAR file (original) (raw)
Lance Andersen lance.andersen at oracle.com
Tue Nov 27 22:50:45 UTC 2018
- Previous message: RFR: JDK-8197398 (zipfs) OutOfMemoryError when talking contents of empty JAR file
- Next message: Clarification on Japanese new Era fix status for Java80
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Deepak,
Roger is right about trying to avoid the extra copy. Sorry I did not point that out previously.
WRT using 47 vs ‘/‘, given that the rest of ZipFileSystem uses ‘/‘, it would be best keep the usage consistent within the class.
Best, Lance
On Nov 27, 2018, at 4:51 AM, Deepak Kejriwal <deepak.kejriwal at oracle.com> wrote:
Hi nio-dev team,
Gentle reminder for review of below fix. Regards, Deepak From: Deepak Kejriwal <deepak.kejriwal at oracle.com> Sent: Thursday, November 8, 2018 12:17 AM To: 'nio-dev at openjdk.java.net' <nio-dev at openjdk.java.net> Subject: RFR: JDK-8197398 (zipfs) OutOfMemoryError when talking contents of empty JAR file Hi all, Please help review the changes for JDK-8199776 to JDK8u:- Master Bug: https://bugs.openjdk.java.net/browse/JDK-8199776 Webrev: http://cr.openjdk.java.net/~rpatil/8199776/webrev.00/
Background:- The Files.walkFileTree walk indefinitely while processing JAR file with "/" as a directory inside. Proposed fix: Files.walkFileTree api for jar internally uses ZipfileSystem. While iterating over the zip entries we have added a check to see if entry name is equal to "/" (absolute path). If the entry name is equal to "/" we don't add it to "inodes" map so that we don't end up with infinite loop. We have similar bug HYPERLINK "https://bugs.openjdk.java.net/browse/JDK-8197398"JDK-8197398 fixed in jdk 12. Below is the difference between fix for jdk 12 and jdk 8:- The fix for above issue for jdk 12 handle a case where we can update an existing entry in jar with "/" (absolute path). As in case of jdk 8 we cannot update the existing zipentry as doing so we get "FileAlreadyExistsException". Therefore, fix for jdk 8u does not consider this case. Regards, Deepak
<http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037 Oracle Java Engineering 1 Network Drive Burlington, MA 01803 Lance.Andersen at oracle.com <mailto:Lance.Andersen at oracle.com>
- Previous message: RFR: JDK-8197398 (zipfs) OutOfMemoryError when talking contents of empty JAR file
- Next message: Clarification on Japanese new Era fix status for Java80
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]