[kaffe] WARNING Bad bytecode! Illegal exception table entry
Ito Kazumitsu
kaz at maczuka.gcd.org
Sun May 23 15:39:02 PDT 2004
Hi,
>>>>> ":" == Helmer Krämer <hkraemer at freenet.de> writes:
:> On the one hand, KJC is clever enough to detect that the
:> condition of the if will always be true, and thus removes
:> it from the bytecode. On the other hand, KJC is not clever
:> enough to detect and remove the unreachable statement "n=1"
:> from the bytecode, as javac does. This means that the end
:> pc of the exception table entry is an unreachable instruction.
:>
:> The jitter in turn doesn't translate the exception table of
:> a method correctly when the end pc is an unreachable insn,
:> which in turn yields the message you've got.
:> And once again thanks for the nice test cases you come
:> up with.
I came up with it when I was playing with HSQLDB 1.7.2 RC6a.
HSQLDB 1.7.2 uses java.nio.channels.FileLock which is not
implemented in kaffe yet. So I modify HSQLDB's org/hsqldb/LockFile.java
as follows:
try {
if (true) { // This if (true) block is what I inserted.
throw new Exception(
"java.nio.channels.FileLock not implemented");
}
Class.forName("java.nio.channels.FileLock");
c = Class.forName("org.hsqldb.NIOLockFile");
lf = (LockFile) c.newInstance();
} catch (Exception e) {
lf = new LockFile();
}
This modification had worked fine until HSQLDB 1.7.2 RC5. But when
I tried 1.7.2 RC6a the problem occurred. First I thought something
went wrong in HSQLDB. But when I recompiled HSQLDB 1.7.2 RC5, the
same problem occurred. So I came to the conclusion that something
is wrong in kjc or kaffe.
More information about the kaffe
mailing list