JDK-7028902 : Broken some gzip files unpacking
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.jar
  • Affected Version: 6u24
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_7
  • CPU: x86
  • Submitted: 2011-03-18
  • Updated: 2012-05-31
  • Resolved: 2012-05-31
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7600]

A DESCRIPTION OF THE PROBLEM :
It's impossible to unpack gzip files, which was packed by dictzip.

dictzip described on http://www.dict.org/announce.html

These files unpacked correctly in jdk 1.6.22 and earlier. Also they unpacked correctly under jdk 1.7.0 snapshot from March 17.

The problem seems to be in the java.util.zip.Inflater.inflateBytes(long addr, byte[] b, int off, int len) native method.

REGRESSION.  Last worked in version 6

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Just try to read dictzip file via GzipInputStream.

You can find test dictzip file at https://omegat.svn.sourceforge.net/svnroot/omegat/trunk/test/data/dicts/latin-francais.dict.dz

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
File should be readable, like in previous JDK versions.
ACTUAL -
Exception in thread "main" java.util.zip.ZipException: incomplete dynamic bit lengths tree
	at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:147)
	at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:92)
	at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:105)
	at org.omegat.core.dictionaries.StarDictTest.main(StarDictTest.java:47)

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Exception in thread "main" java.util.zip.ZipException: incomplete dynamic bit lengths tree
	at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:147)
	at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:92)
	at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:105)
	at org.omegat.core.dictionaries.StarDictTest.main(StarDictTest.java:47)


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
    public static void main(String[] a) throws Exception {
        InputStream in = new GZIPInputStream(new FileInputStream("latin-francais.dict.dz"));
        in.read();
    }

---------- END SOURCE ----------

Comments
EVALUATION The problem does not happen with 622 or jdk7. Duplicates with 6u23.
16-05-2011