Re: verification error
Eliot Moss <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
On 10/22/2011 3:47 AM, luc peuvrier at home wrote: > Using asm 3.3 I have following error > java.lang.VerifyError: (class: net/sf/joafip/java/util/PTreeSet$Joafip$0, method: <init> signature: > (Lnet/sf/joafip/store/service/objectio/manager/IObjectIOManagerForProxyObjectIO;Ljava/util/Collection;Ljava/util/Comparator;Z)V) > Expecting to find object/array on stack Not sure why you're getting *that* error, but see below: > for the following generated bytecode If I read this correctly, the method is a constructor (<init> method). > // Method descriptor #90 > (Lnet/sf/joafip/store/service/objectio/manager/IObjectIOManagerForProxyObjectIO;Ljava/util/Collection;Ljava/util/Comparator;Z)V > // Stack: 5, Locals: 5 > public > PTreeSet$Joafip$0(net.sf.joafip.store.service.objectio.manager.IObjectIOManagerForProxyObjectIO > arg0, java.util.Collection arg1, java.util.Comparator arg2, boolean arg3); > 0 aload_0 [this] > 1 new Lnet.sf.joafip.store.service.proxy.ProxyCallBack; [24] > 4 dup > 5 aload_1 [arg0] > 6 aload_0 [this] Here you ae trying to pass "this", a not-yet-initialized object, in a call. That is a no-no! Verification should complain here, at bytecode 7, unless I am confused (entirely possible). > 7 invokespecial > Lnet.sf.joafip.store.service.proxy.ProxyCallBack;(net.sf.joafip.store.service.objectio.manager.IObjectIOManagerForProxyObjectIO, > java.lang.Object) [27] > 10 putfield net.sf.joafip.java.util.PTreeSet$Joafip$0.$proxyCallBack$ : > net.sf.joafip.store.service.proxy.IProxyCallBackProxyDelegation [19] > 13 aload_0 [this] > 14 aload_2 [arg1] > 15 aload_3 [arg2] > 16 iload 4 [arg3] The problem here, then, is that the verifier may be thinking that "this" is already initialized, in which case calling a superclass <init> would be bad. > 18 invokespecial net.sf.joafip.java.util.PTreeSet(java.util.Collection, java.util.Comparator, > boolean) [89] > 21 aload_0 [this] > 22 invokevirtual net.sf.joafip.java.util.PTreeSet$Joafip$0.methodEnd$JOAFIP$() : void [31] > 25 return Regards, Eliot Moss
message-footer.txt
(text/plain, 238 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws