views:

62

answers:

2

In my bytecode instrumentation project, I stumble frequently on VerifyErrors. However, the default java Verifier gives little information on which instruction resulted in the error (it only gives the method and a small message). Is there any stand-alone bytecode verifier which provides with a little more advanced help in locating the error, at least the precise instruction location? Thank you.

+1  A: 

As with any project involving JVM bytecode, I would first check to see whether the BCEL has anything that might be useful for you. Also, perhaps FindBugs may help - though I'm not sure whether it assumes verifiable bytecode to start with or not.

Greg Hewgill
Why didn't I think of that. I am actually using BCEL, but it never occured to me to check its verifier. It has actually one called JustIce.
HH
A: 

ASM CheckClassAdaptor.verify() gives great feedback: http://asm.ow2.org/

Jevgeni Kabanov