ReferenceProxy causes java.lang.VerifyError: Bad local variable type
BullyWiiPlaza opened this issue · 0 comments
BullyWiiPlaza commented
Bug Report
Expected Behaviour
After obfuscation the program runs without crashing.
Actual Behaviour
>java -jar "Mario Kart 8 Trainer-Obfus.jar"
Error: Unable to initialize main class TrainerGUILauncher
Caused by: java.lang.VerifyError: Bad local variable type
Exception Details:
Location:
TrainerGUILauncher.lIlllllIlIlIllIlIIl(Ljava/lang/Object;)I @41: aload_3
Reason:
Type top (current frame, locals[3]) is not assignable to reference type
Current Frame:
bci: @41
flags: { }
locals: { 'java/lang/Object', 'java/lang/Object' }
stack: { }
Bytecode:
0000000: 014e 1266 1283 03bd 0053 4c2b b600 574c
0000010: 2b04 b600 5d03 bd00 044d 2b2a 2cb6 0061
0000020: 4ea7 0008 4c2b b600 642d b800 89ac
Exception Handler Table:
bci [0, 33] => handler: 36
Stackmap Table:
same_locals_1_stack_item_frame(@36,Object[#15])
append_frame(@41,Object[#4])
How to reproduce the behaviour
- Obfuscate the JAR with the following config:
{
"input": "Mario Kart 8 Trainer.jar",
"output": "Mario Kart 8 Trainer-Obfus.jar",
"script": "function isRemappingEnabledForClass(node) {\n return false;\n}\nfunction isObfuscatorEnabledForClass(node) {\n return true;\n}",
"Crasher": {
"Enabled": false
},
"InvokeDynamic": {
"Enabled": false
},
"Optimizer": {
"Enabled": true,
"Replace String.equals()": false,
"Replace String.equalsIgnoreCase()": false,
"Optimize static string calls": false
},
"LineNumberRemover": {
"Enabled": true,
"Rename local variables": true,
"Remove Line Numbers": true,
"Remove Debug Names": true,
"Add Local Variables": true,
"New SourceFile Name": ""
},
"StringEncryption": {
"Enabled": true,
"HideStrings": true,
"AES": false
},
"NumberObfuscation": {
"Enabled": true,
"Extract to Array": true,
"Obfuscate Zero": true,
"Shift": true,
"And": true,
"Multiple Instructions": true
},
"ReferenceProxy": {
"Enabled": false
},
"ShuffleMembers": {
"Enabled": false
},
"InnerClassRemover": {
"Enabled": false,
"Remap": false,
"Remove Metadata": false
},
"NameObfuscation": {
"Enabled": true
},
"Packager": {
"Enabled": false,
"Use MainClass from the JAR manifest": true,
"Main class": "org.example.Main"
},
"FlowObfuscator": {
"Enabled": true,
"Mangle Comparisons": true,
"Replace GOTO": true,
"Replace If": true,
"Bad POP": true,
"Bad Concat": true,
"Mangle Switches": true,
"Mangle Return": false,
"Mangle Local Variables": false
},
"HideMembers": {
"Enabled": true
},
"Inlining": {
"Enabled": false
}
}
- Run the JAR
- It crashes with the above exception