I work on a binary instrumentation platform for Android. Our platform
instruments binary code to add things like logging, dynamic analysis,
inline reference monitors, etc...
Quite frequently, I'll rewrite a Dalvik class file, and run it on a
device. Sometimes it will fail immediately upon installation and the
verifier will give an occasionally useful error. But sometimes I don't
get verification errors until runtime.
Instead, I'll get strange errors that I'm not sure how to debug.
W/dalvikvm( 2658): VFY: copy1 v1<-v18 type=-1531563544 cat=1
W/dalvikvm( 2658): VFY: rejecting opcode 0x02 at 0x0091
W/dalvikvm( 2658): VFY: rejected
W/dalvikvm( 2658): Verifier rejected class
(I've replace full classpaths with ellipses for anonymity of the app.)
Unfortunately, debugging these kinds of errors is hard: these errors
aren't very descriptive. I'd like to know one of the following things:
- Could someone point me into the source code where these various
errors are thrown so I can read the interpreter's implementation and
try to tease out what individual opcode errors correspond to?
- E.g., I suspect that in this case it's because of a register type
mismatch after a register verify path
- I'd suspect that code would be somewhere like this:
- Is there any way I can run the verifier without booting up a
device, can I get a finer grained / better error message for bytecode
- Is there a debug flag for the verifier that I can turn on to be
able to get a better idea about what's happening?
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com.
To post to this group, send email to firstname.lastname@example.org.
Visit this group at http://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.