-
Enhancement
-
Resolution: Fixed
-
P3
-
8, 9
-
None
-
b99
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8146693 | 8-pool | Ravi Reddy | P3 | Open | Unresolved |
(1) Its ZIP file format support code is in native C code (shared with the VM via ZipFile.c -> zip_util.c). Any entry lookup, creation requires multiple round-trip of expensive jni invocations.
(2) The current native C implementation code uses mmap to map in the central directory table appears to be a big risk of vm crash when the underlying jar file gets overwritten with new contents while it is still being used by other ZipFile.
(3) The use of "filename + lastModified()" cache (at native) appears to be broken if the timestamp is in low resolution,and/or the file is being overwritten.
The clean solution here is to bring the ZIP format support code from native to Java to remove the jni invocation cost and the mmap risk. Also to use the fileKey and lastModified from java.nio.file.attribute.BasicFileAttributes to have better cache matching key.
--
The first try of this enhancement
- backported by
-
JDK-8146693 To bring j.u.z.ZipFile's native implementation to Java to remove the expensive jni cost and mmap crash risk [2]
-
- Open
-
- duplicates
-
JDK-8152661 Crash in memmove when called from libzip
-
- Closed
-
-
JDK-8031691 Crash in Zipfile.GetEntry
-
- Closed
-
- relates to
-
JDK-8334048 -Xbootclasspath can not read some ZIP64 zip files
-
- In Progress
-
-
JDK-8226530 ZipFile reads wrong entry size from ZIP64 entries
-
- Resolved
-
-
JDK-8336843 Deprecate java.util.zip.ZipError for removal
-
- Resolved
-
-
JDK-8345835 Optimize central directory reading in java.util.zip.ZipFile
-
- New
-
-
JDK-8142508 To bring j.u.z.ZipFile's native implementation to Java to remove the expensive jni cost and mmap crash risk
-
- Resolved
-
-
JDK-8146431 j.u.z.ZipFile.getEntry("") throws AIOOBE
-
- Resolved
-
-
JDK-8170831 ZipFile implementation no longer caches the last accessed entry/pos
-
- Resolved
-
-
JDK-8144958 changes by JDK-8142508 seems to have broken jtreg
-
- Closed
-
-
JDK-8242842 Avoid reallocating name when checking for trailing slash in ZipFile.getEntryPos
-
- Resolved
-
-
JDK-4347142 Need method to set Password protection to Zip entries
-
- Closed
-