Re: Analyzer for testing code flow correctness

[email protected]
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <1827236346.2507691282907695502.JavaMail.root@zimbra7-e1.priv.proxad.net>
Marcin Rzeźnicki wrote:
> Hi,
> Recently I've discovered I need better test system for my Coroutines
> project. Up till now I've been loading transformed classes and simply
> tried to run modified methods to see whether I ended up with a
> VerifierError or not. It would be better if I could discover
> transformation mistakes during transformation itself and react
> accordingly on the spot, but I could not find anything in ASM that
> would detect all possible transformation errors - wrong stack maps,
> incompatible operands/local types - basically, everything that java
> verifier does. Hence the question, is there anything in ASM that can
> go through generated byte code and do the complete verification, so
> that - if finished without error - I could be certain that java
> verifier won't oppose? I'm only interested in Java 6 code. Thanks in
> advance

the main method in CheckClassAdapter does something like that (using asm.tree.analysis.SimpleVerifier). But it does not check the stack 
maps (it does a full type inference, without using the stack maps; it 
is then quite straightforward to check if the stack maps are compatible
with the inferred types; but this is currently not implemented). More 
generally, you can't be certain that the exact same algorithms are used
as in the JVM verifier, since this is a completely different 
implementation.

Eric
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.