Recaf
Recaf copied to clipboard
Unable to parse the class
Describe the bug
I was working on a deobfuscated jar file, It was originally obfuscated by Radon and then deobfuscated by java-deobfuscator. I found a class that ASM probably couldn't parse it so it was showing as a file rather than a class. After I passed the jar through the Threadtear, the class became visible as a normal class in Recaf
To Reproduce
- Open the class that has NOT passed through Threadtear in Recaf (and see it shows as a file)
- Open the class that has passed through Threadtear in Recaf (and see it shows as a class)
(Even if the other ones in the jar are deobfuscated successfully, this class remains obfuscated , probably java-deobfuscator couldn't parse it, too)
I don't know what the cause is, but i guess it is because ASM-crashing junk data. I know that kinda stuff should be handled by the deobfuscators not Recaf, but like a bug I found earlier (junk data causing renaming to fail), it is better to make it handle, in my opinion.
Seems to be a JPhantom problem.
java.lang.RuntimeException: org.objectweb.asm.tree.analysis.AnalyzerException: Execution can fall off the end of the code
at org.clyze.jphantom.JPhantom.run(JPhantom.java:86)
at me.coley.recaf.util.JPhantomUtil.generate(JPhantomUtil.java:76)
at me.coley.recaf.util.CompileDependencyUpdater.createPhantoms(CompileDependencyUpdater.java:108)
at me.coley.recaf.util.CompileDependencyUpdater.lambda$null$0(CompileDependencyUpdater.java:74)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:831)
Caused by: org.objectweb.asm.tree.analysis.AnalyzerException: Execution can fall off the end of the code
at org.objectweb.asm.tree.analysis.Analyzer.findSubroutine(Analyzer.java:391)
at org.objectweb.asm.tree.analysis.Analyzer.analyze(Analyzer.java:139)
at org.clyze.jphantom.constraints.extractors.TypeConstraintExtractor.visit(TypeConstraintExtractor.java:58)
at org.clyze.jphantom.constraints.extractors.TypeConstraintExtractor.visit(TypeConstraintExtractor.java:46)
at org.clyze.jphantom.JPhantom.run(JPhantom.java:84)
... 8 more
Seems to be a JPhantom problem.
This is only for the "patched" file though. The main concern is that it doesn't show up as a class unpatched, which should be handled by CAFED00D. ~~I'll take a look at it some time tomorrow.~~ ~~Ok, tomorrow for real this time.~~ Well, I'm just gonna get to it when I get to it. Things keep coming up :/
Seems to be a JPhantom problem.
This is only for the "patched" file though. The main concern is that it doesn't show up as a class unpatched, which should be handled by CAFED00D. I'll take a look at it some time tomorrow.
Oops, you are right
Can no longer reproduce the original issue on at least 427b048c07b7a5791514295e54484f6a17b0ffbc of dev3:
17:31:56.237 [ClassPatchingListener:INFO] Recovered 1/1 (100.00%) malformed classes
There are still some issues with the fields & methods outline
(screenshot from the fallback decompiler as cfr completely fails on this class)
Whats the issue with field/method outline? I can't see it?
@xxDark It doesn't show synthetics by default. I think we should probably make it invert that so synthetics are the default.
One of the menu buttons toggles it.
@MizzMaster Is this class even accepted by JVM's verifier? The IFEQ instruction jumps outside of code.