What steps will reproduce the problem?
1. Download the ASM bytecode library (http://asm.ow2.org/)
2. Compile the attached test program
3. Run dex2jar on the Camera application from R8 of the Android SDK
4. Extract the resulting jar file into $CAMERA_TMP
5. Run the test program on one of the classes from the Camera application:
java -cp asm-all-3.3.1.jar:.:$ANDROID_JAR:$CAMERA_TMP $CAMERA_TMP/com/android/camera/Util.class
What is the expected output? What do you see instead?
I expect there to be no verification exceptions. Instead, ASM reports several
verification exceptions. In summary:
org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction 31: First argument: expected F, but found D
org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction 22: Expected I, but found F
org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction 2: First argument: expected I, but found Ljava/lang/Object
org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction 50: First argument: expected I, but found Landroid/graphics/Bitmap
I experienced similar verification issues on many of the class files extracted
from the Android SDK (R8). The class files all seem to be syntactically
correct, but many are not completely semantically correct.
Fortunately, ASM provides a lot of debugging output when verification fails.
I've attached a log of its output on the com.android.camera.Util class, and
similar logs should be easily created for other class files.
What version of the product are you using? On what operating system?
I'm running the latest Mercurial checkout of dex2jar as of March 10, 2011. The
most recent changeset in 'hg log' is 109:419340041bfe. I'm using Mac OS X
10.6.6, with JVM version 1.6.0_22.
Please provide any additional information below.
It may make sense to include bytecode verification tests, along with parsing
tests, in the dex2jar test suite.
Original issue reported on code.google.com by aaront...@gmail.com on 10 Mar 2011 at 7:22
Original issue reported on code.google.com by
aaront...@gmail.com
on 10 Mar 2011 at 7:22Attachments: