Re: bytecode verification

Yao Qi <[email protected]>
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <[email protected]>
On Wed, Nov 10, 2010 at 1:01 PM, luc peuvrier at home <[email protected]> wrote:
> When JVM load my transformed code I have the here below error:
> java.lang.VerifyError: (class:
> net/sf/joafip/store/service/objectfortest/Bob1, method: <init> signature:
> (Lnet/sf/joafip/store/service/proxy/IInstanceFactory;Z)V) Expecting to find
> object/array on stack
>
> The error is not verbose and not helpfull to make able to debug.
>

You can dump your instrumented byte code into file, and using javap to
check the byte code,
especially in Bob1 (IInstanceFactory, ).  You should find the problem.
 I did this
many times before. :)

> So I used CheckClassAdapter.verify on my transformed code expecting verbose
> error report, but it accept the byte code.
>
> It seems CheckClassAdapter.verify has not the same behaviour man the JM
> bytecode verifier.

Yeah, different JVM has different security/verification checking,
mostly more strict
than CheckClassAdapter.verify.

>
> Witch tools make able to verify bytecode like jvm verifier but with verbose
> output for debug purpose ?

I was looking for that tool for a long time, but unfortunately, I
didn't  get anything
useful.

-- 
Yao Qi <qiyaoltc AT gmail DOT com>
http://sites.google.com/site/duewayqi/
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.