verification error in 3.3
Per Bothner
per@bothner.com
Sun May 4 20:55:00 GMT 2003
I tried building latest Kawa (from CVS) using the
GCJ in the 3.3 branch of CVS. I get a
Exception in thread "main" java.lang.VerifyError: verification failed at
PC 24 in
gnu.expr.Interpreter:eval((Ljava.lang.String;Ljava.io.Writer;)V):
incompatible type on stack
The expected type is the interface gnu.lists.Consumer.
The type on the stack is gnu.mapping.OutPort, which extends
gnu.lists.PrintConsumer, which implements gnu.lists.Consumer.
I.e. the verifier shoudl not complain.
To reproduce the bug, grag:
ftp://bothner.com/pub/kawa-1.7beta1.tar.gz
Untar, and set PATH and LD_LIBRARY_PATH to get gcc 3.3.
$ ./configure --with-gcj
$ make
$ gij kawa.repl
Exception in thread "main" java.lang.VerifyError: verification failed at
PC 24 in
gnu.expr.Interpreter:eval((Ljava.lang.String;Ljava.io.Writer;)V):
incompatible type on stack
at _Jv_BytecodeVerifier.verify_fail(byte, int)
(/home/bothner/GNU/install-gcc3.3/lib/libgcj.so.4.0.0)
at _Jv_BytecodeVerifier.verify_instructions_0()
(/home/bothner/GNU/install-gcc3.3/lib/libgcj.so.4.0.0)
at _Jv_VerifyMethod(_Jv_InterpMethod)
(/home/bothner/GNU/install-gcc3.3/lib/libgcj.so.4.0.0)
at _Jv_PrepareClass(java.lang.Class)
(/home/bothner/GNU/install-gcc3.3/lib/libgcj.so.4.0.0)
at java.lang.ClassLoader.linkClass0(java.lang.Class)
(/home/bothner/GNU/install-gcc3.3/lib/libgcj.so.4.0.0)
at java.lang.ClassLoader.resolveClass0(java.lang.Class)
(/home/bothner/GNU/install-gcc3.3/lib/libgcj.so.4.0.0)
at java.lang.Class.initializeClass()
(/home/bothner/GNU/install-gcc3.3/lib/libgcj.so.4.0.0)
at _Jv_ResolvePoolEntry(java.lang.Class, int)
(/home/bothner/GNU/install-gcc3.3/lib/libgcj.so.4.0.0)
at kawa.repl.getInterpreter() (Unknown Source)
at kawa.repl.main(java.lang.String[]) (Unknown Source)
The eval method is simple:
Method name:"eval" public final Signature:
543=(java.lang.String,java.io.Writer) void
Attribute "Code", length:52, max_stack:6, max_locals:3, code_length:28
0: aload_0
1: aload_1
2: aload_2
3: instanceof #545=<Class gnu.lists.Consumer>
6: ifeq 16
9: aload_2
10: checkcast #545=<Class gnu.lists.Consumer>
13: goto 24
16: new #320=<Class gnu.mapping.OutPort>
19: dup
20: aload_2
21: invokespecial #548=<Method gnu.mapping.OutPort.<init>
(java.io.Writer)void>
24: invokevirtual #551=<Method gnu.expr.Interpreter.eval
(java.lang.String,gnu.lists.Consumer)void>
27: return
Attribute "LineNumberTable", length:6, count: 1
line: 549 at pc: 0
Attribute "Exceptions", length:4, count: 1
0: #279=<Class java.lang.Throwable>
--
--Per Bothner
per@bothner.com http://per.bothner.com/
More information about the Java
mailing list