List of issuesList of issues

#942 AS3 Deobfsucation - Stack owerflow exception in visitCode
Author: developer honfika
Date created:
Type: bug
Visibility: Everybody
Assigned to:
Labels: AS3DecompilationDeobfuscation
State: closed Help

> What steps will reproduce the problem? Open 71C0000 - 13.swf Find the method which is in the exception message. > What is the expected output? What do you see instead? Exception Jul 05, 2015 7:21:58 AM convert SEVERE: Decompilation error in §_-KG§/§_-61p§.initializer java.util.concurrent.ExecutionException: java.lang.StackOverflowError at Source) at java.util.concurrent.FutureTask.get(Unknown Source) at com.jpexs.helpers.CancellableWorker.get( at at at at at at$ at$ at com.jpexs.helpers.CancellableWorker$3.doInBackground( at com.jpexs.helpers.CancellableWorker$ at Source) at at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$ Source) at Source) Caused by: java.lang.StackOverflowError at java.util.HashMap.put(Unknown Source) at at at + 1000 more lines in visitCode > What version of the product are you using? Is it "nighlty build"? Which operating system do you have? > Please provide any additional information below. If the problem is related to a SWF file, attach it here, otherwise we can't help you. This method is quite large (about 13000 instruction), but contains only about 1200 labels (jump targets), i can't belive that they are called in 1 single chain. In visitcode the IfType instuctions are recursively visited before visiting the instructions in the current flow. Maybe it would be better to fisrt check the instuctions in the current flow. I mean: ins1 ins2 ifxx label2 ins4 ins5 label2: ins6 ins7 Currently the order is: ins1, ins2, ifxx, (recursive call) ins6, ins7 (return), ins4. ins5 In the suggested way: ins1, ins2, ifxx, ins4, ins5, ins6, ins7 (now check the "ifxx" target, but it is already processed) For this you need to collect the possible targets to a list. Or iterate 2 times on the instuction list. First only mark the instuctions in the current flow only, do not jump anywhere, 2nd time is the current implementation.
The StackoverFlow in visitCode should be fixed now. The method still timeouts. I think the problem here is that register deobfuscator works only when there is only one assignment to the registers. In this code, the true/false registers are assigned again - mostly in unreachable code... I'll try it to fix it...
State: new→returned
Current revision should handle it better :-).
State: returned→upgraded
Works, and no timeout. Thank you.
State: upgraded→closed
Google Translate: Translate to Czech Translate to Slovak Translate to Russian Translate to Hungarian Translate to Swedish Translate to French Translate to German Translate to Spanish Translate to Italian
Change style: oceanic classic