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

Dex2Jar generates invalid java/text/SimpleDateFormat class (Verifier error) #206

Open
GoogleCodeExporter opened this issue Mar 15, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. run the runVerify.sh attached script 
2.
3.

What is the expected output? What do you see instead?

Making a dex file with dx tool from a jar (which has no verifier error) 
and then using  dex2jar to generate a new jar, generated a class with Verifier 
error. DVM also reports the Verifier error when trying to boot with the new 
class... 
(Note that this problem occurs only on the java/text/SimpleDateFormat class.
All other classes from core.jar that are passed to dx and dex2jar work fine.

This is the output of the BCEL verifier after running dex2jar

Pass 3b, method number 0 ['static void <clinit>()']:
VERIFIED_REJECTED
Constraint violated in method 'static void <clinit>()':
Instruction LDC constraint violated: Referenced constant should be a 
CONSTANT_Integer, a CONSTANT_Float or a CONSTANT_String, but is 
'CONSTANT_Class[7](name_index = 34)'.
InstructionHandle:   13: ldc[18](2) 35

Execution Frame:
Local Variables:
0: java.io.ObjectStreamField[]
OperandStack:
Slots used: 5 MaxStack: 6.
java.lang.String (Size: 1)
<UNINITIALIZED OBJECT OF TYPE 'java.io.ObjectStreamField'> (Size: 1)
<UNINITIALIZED OBJECT OF TYPE 'java.io.ObjectStreamField'> (Size: 1)
int (Size: 1)
java.io.ObjectStreamField[] (Size: 1)
Execution flow:
   0: iconst_4  [InstructionContext]
   1: anewarray 32  [InstructionContext]
   4: astore_0  [InstructionContext]
   5: aload_0   [InstructionContext]
   6: iconst_0  [InstructionContext]
   7: new 32    [InstructionContext]
  10: dup   [InstructionContext]
  11: ldc 33    [InstructionContext]
  13: ldc 35    [InstructionContext]



What version of the product are you using? On what operating system?
dex2jar 0.0.15 with Java 1.6 on Linux Ubuntu 13.04

Please upload the file which cause the issue if possible.


Please provide any additional information below.

The simple.jar contains the java/text/SimpleDateFormat.class from core.jar
I used jarjar to change the package to org/d2j/java/text (to avoid conflicts 
with 
one in rt.jar)

The original SimpleDateFormat.class passes BCEL Verifier
but the one generated by dex2jar (after putting it on a dex file with dx) 
has a class that is not valid.


Original issue reported on code.google.com by [email protected] on 6 Dec 2013 at 5:35

Attachments:

@GoogleCodeExporter
Copy link
Author

dex2jar version is 0.0.9.15...

Original comment by [email protected] on 6 Dec 2013 at 5:36

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