This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgcj/13439] New: gij VerifyError; works with JDK 1.4
- From: "bothner at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Dec 2003 07:15:11 -0000
- Subject: [Bug libgcj/13439] New: gij VerifyError; works with JDK 1.4
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Grab kawa-1.7.90.jar from ftp://ftp.gnu.org/pub/gnu/kawa ,
(after building and installing CVS head gcc), do:
$ gij -jar kawa-1.7.90.jar --xquery --debug-dump-zip -e '(for $y in (5,4) return
<b>{10+$y}</b>)[2]'
We get:
java.lang.VerifyError: verification failed at PC 125 in
atInteractiveLevel:apply((Lgnu.mapping.CallContext;)V): incompatible type on stack
It works using Sun's JDK 1.4.2.
The --debug-dump-zip option above creates kawa-zip-dump-1.zip,
which can be examined using jcf-dump.
Method name:"apply" public final Signature: 143=(gnu.mapping.CallContext)void
Attribute "Code", length:226, max_stack:5, max_locals:12, code_length:138
10: invokestatic #18=<Method gnu.mapping.Values.make ()gnu.mapping.Values>
13: astore_3
14: getstatic #24=<Field atInteractiveLevel.Lit0 gnu.math.IntNum>
17: astore 4
19: jsr 33
22: getstatic #27=<Field atInteractiveLevel.Lit1 gnu.math.IntNum>
25: astore 4
27: jsr 33
30: goto 124
33: astore 5
35: aload 4
37: astore 4
39: aload_3
40: astore 6
...
89: jsr 103
92: goto 116
103: astore 11
105: aload 6
107: aload_3
108: invokestatic #74=<Method gnu.kawa.xml.NodeConstructor.popNodeConsumer (gnu.
lists.Consumer,gnu.lists.Consumer)void>
111: aload 6
113: astore_3
114: ret 11
116: aload 9
118: aload 8
120: aload 7
122: ret 5
124: aload_3
125: invokevirtual #78=<Method gnu.mapping.Values.canonicalize ()java.lang.Objec
t>
We get to 125 from 30. The issue is presumably register 3,
which is set in 13. The subroutine at 33 saved 3 in register 6,
trashes 3, and restores 3 from 6 at 113. To complicate things,
there is a nested subroutine at 103, which actually restores 3.
(This rather convoluted code is generated by Kawa to deal with
XQuery sequences. I don't claim it's optimal, but I believe
it is correct.)
--
Summary: gij VerifyError; works with JDK 1.4
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bothner at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13439