All,

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
L...MapSerializer;.serializeTypedFields
(Ljava/util/Map;L...JsonGenerator;L...SerializerProvider;)V
W/dalvikvm( 2658): Verifier rejected class
L...MapSerializer;

(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:
      https://github.com/CyanogenMod/android_dalvik/blob/cm-10.2/vm/analysis/RegisterMap.cpp

  - 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
verification errors.

  - 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?

Thanks!

Kris Micinski

--
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 android-platform+unsubscribe@googlegroups.com.
To post to this group, send email to android-platform@googlegroups.com.
Visit this group at http://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
groupandroid-platform @
categoriesandroid
postedSep 10, '15 at 2:54p
activeSep 10, '15 at 2:54p
posts2
users1
websiteandroid.com

1 user in discussion

Kristopher Micinski: 2 posts

People

Translate

site design / logo © 2019 Grokbase