ZipInputStream brokenness
Adam Megacz
gcj@lists.megacz.com
Wed Aug 28 15:28:00 GMT 2002
Tom Tromey <tromey@redhat.com> writes:
> I have a partial patch for this. It is appended. It still has at
> least one bug, since your test program still fails. I don't have time
> to work on it any more right now; I'm going out of town again tomorrow
> and I have a lot of other stuff to do. Feel free to debug the last
> couple things if you're motivated. If not, I'll resurrect it sometime
> after I get back.
Did you ever check in this patch? This program still fails with HEAD:
import java.util.zip.*;
import java.net.*;
import java.io.*;
public class Test {
public static void main(String[] s) throws Exception {
URL u = new URL("http://www.xwt.org/dist/xwt-0258.jar");
InputStream is = u.openStream();
ZipInputStream zis = new ZipInputStream(is);
while(true) {
ZipEntry ze = zis.getNextEntry();
System.out.println(ze.getName());
}
}
}
megacz@curry$./a.out
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -134840112
at 0x4025f5c0: java.lang.Throwable.Throwable(java.lang.String) (/usr/local/gcc/lib/libgcj.so.3)
at 0x4024e226: java.lang.Exception.Exception(java.lang.String) (/usr/local/gcc/lib/libgcj.so.3)
at 0x40252f96: java.lang.RuntimeException.RuntimeException(java.lang.String) (/usr/local/gcc/lib/libgcj.so.3)
at 0x4024f036: java.lang.IndexOutOfBoundsException.IndexOutOfBoundsException(java.lang.String) (/usr/local/gcc/lib/libgcj.so.3)
at 0x40249746: java.lang.ArrayIndexOutOfBoundsException.ArrayIndexOutOfBoundsException(java.lang.String) (/usr/local/gcc/lib/libgcj.so.3)
at 0x40222866: _Jv_ThrowBadArrayIndex (/usr/local/gcc/lib/libgcj.so.3)
at 0x403495b5: java.util.zip.ZipInputStream.getNextEntry() (/usr/local/gcc/lib/libgcj.so.3)
at 0x08048cfc: Test::main(JArray<java::lang::String*>*) (??:0)
at 0x40234668: gnu.gcj.runtime.FirstThread.call_main() (/usr/local/gcc/lib/libgcj.so.3)
at 0x402bdbd8: gnu.gcj.runtime.FirstThread.run() (/usr/local/gcc/lib/libgcj.so.3)
at 0x4024109c: _Jv_ThreadRun(java.lang.Thread) (/usr/local/gcc/lib/libgcj.so.3)
at 0x40223bcc: _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/local/gcc/lib/libgcj.so.3)
at 0x40223ced: JvRunMain (/usr/local/gcc/lib/libgcj.so.3)
at 0x08048c54: main (??:0)
at 0x4060614f: __libc_start_main (/lib/libc.so.6)
at 0x08048b31: _start (??:0)
- a
--
"Cassette tapes are killing the music industry" -- RIAA spokesperson, 1978
More information about the Java
mailing list