Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many generated class files do not verify #47

Closed
GoogleCodeExporter opened this issue Apr 7, 2015 · 0 comments
Closed

Many generated class files do not verify #47

GoogleCodeExporter opened this issue Apr 7, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

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

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant