This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
zip infrastructure bug?
- To: java at gcc dot gnu dot org
- Subject: zip infrastructure bug?
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: Thu, 18 Oct 2001 18:36:35 -0700
- Reply-to: apbianco at cygnus dot com
I'm having problems running jython on a jython.jar created with
jar. Using the JDK's jar tool is a work around for me so far.
I've been inserting traces in
java.util.zip.ZipInputStream.read (byte[] b, int off, int len) and in
natInflater.cc:java::util::zip::Inflater::inflate (jbyteArray buf,
jint off, jint len) trying to figure this out.
Here's what I obtain:
From java.util.zip.ZipInputStream.read (byte[] b, int off, int len)
ZipInputStream.java:read this java.util.zip.ZipInputStream@810bf90avail = 5
ZipInputStream.java:read off 0, len 5
From java::util::zip::Inflater::inflate (jbyteArray buf, jint off, jint len)
off= 0, len= 5, buf->length= 5
After than, count is printed,
ZipInputStream.java:read count 5
avail is updated and printed:
ZipInputStream.java:read avail 0
So avail is set to zero, which seems to be OK.
And then java.util.zip.ZipInputStream.read is called one more time,
note that this is the same object:
ZipInputStream.java:read this java.util.zip.ZipInputStream@810bf90avail = -5
ZipInputStream.java:read off 0, len -5
off= 0, len= -5, buf->length= 1
Now avail is set to -5. There could be some code executed before
ZipInputStream.java:read is called again, I don't know the code enough
to tell where. It could also be a random pollution, but 5 seems to be
consistent with what happened before, and shows up all the time.
The rest of the stack looks like what follows. I updated my libgcj
tree since things changed in that region recently, I'm just rebuilding
but I'm having some problems...
Of course, jar could be producing a corrupted archive.
./A
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
at 0x404fcbf1: java.lang.Throwable.Throwable() (/home/apbianco/install/egcs/install-x86/lib/libgcj.so.2)
at 0x404f0f4f: java.lang.Exception.Exception() (/home/apbianco/install/egcs/install-x86/lib/libgcj.so.2)
at 0x404f5a5f: java.lang.RuntimeException.RuntimeException() (/home/apbianco/install/egcs/install-x86/lib/libgcj.so.2)
at 0x404f1f0f: java.lang.IndexOutOfBoundsException.IndexOutOfBoundsException() (/home/apbianco/install/egcs/install-x86/lib/libgcj.so.2)
at 0x404ec02f: java.lang.ArrayIndexOutOfBoundsException.ArrayIndexOutOfBoundsException() (/home/apbianco/install/egcs/install-x86/lib/libgcj.so.2)
at 0x404eb422: java.util.zip.Inflater.inflate(byte[], int, int) (/home/apbianco/install/egcs/install-x86/lib/libgcj.so.2)
at 0x405ad3c8: java.util.zip.InflaterInputStream.read(byte[], int, int) (/home/apbianco/install/egcs/install-x86/lib/libgcj.so.2)
at 0x405af26d: java.util.zip.ZipInputStream.read(byte[], int, int) (/home/apbianco/install/egcs/install-x86/lib/libgcj.so.2)
at 0x405ad241: java.util.zip.InflaterInputStream.read() (/home/apbianco/install/egcs/install-x86/lib/libgcj.so.2)
at 0x40500fc2: java.io.DataInputStream.readByte() (/home/apbianco/install/egcs/install-x86/lib/libgcj.so.2)
at 0x40159a9c: org.python.core.PackageManager.checkAccess(java.io.InputStream) (/home/apbianco/build/rhug/i686-pc-linux-gnu/jython/.libs/lib-org-jython.so.0)
...