[kaffe] Problem: gcMalloc: Assertion `fidx < nrTypes && size != 0' failed.

Timothy Stack stack at cs.utah.edu
Thu Apr 25 07:50:31 PDT 2002


> Hi Dalibor,
> Am sending a test program that results in the same assertion problem.
> The test program takes a jar file location, reads contents from each file in
> the jar and prints the same to standard output. It uses ZipFile and ZipEntry
> classes present in java.util.zip.* pkg.
> Attachments :
> Test.java --> source code of java file.
> Test.jar --> dummy jar file for input to the program. This contains the same
> "Test.java".

I was able to verify the problem, kaffe is trying to decompress a zero
length file.  So, when it allocates a buffer to inflate the data in,
it crashes.  But, i also tried it in janosvm's newer jar file code, but
it doesn't like the format of the file, the size of the central
directory didn't match the number of entries.  This may or may not be a
problem for kaffe as well.  What did you use to make the jar file?

Anyways, java_util_zip_ZipFile_getZipData0 in
libraries/clib/native/ZipFile.c should prolly check for a zero length file
before calling getDataJarFile().

> Thanks & regards,
> Santosh

tim stack

More information about the kaffe mailing list