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

[core] Decompilation stucks for an app #1360

Closed
bagipro opened this issue Feb 1, 2022 · 1 comment
Closed

[core] Decompilation stucks for an app #1360

bagipro opened this issue Feb 1, 2022 · 1 comment
Labels
bug Core Issues in jadx-core module

Comments

@bagipro
Copy link
Collaborator

bagipro commented Feb 1, 2022

Hey,

I've noticed an app that's not decompiled within 30 mins, jstack shows the following stacktace:

"pool-5-thread-3" #45 prio=5 os_prio=31 cpu=107702.70ms elapsed=115.86s tid=0x00007fac07354000 nid=0x1d137 runnable  [0x000070001eab0000]
   java.lang.Thread.State: RUNNABLE
	at jadx.core.utils.BlockUtils.forEachBlockFromBitSet(BlockUtils.java:377)
	at jadx.core.utils.BlockUtils.getPathCross(BlockUtils.java:714)
	at jadx.core.utils.BlockUtils.getPathCross(BlockUtils.java:743)
	at jadx.core.dex.visitors.regions.IfMakerHelper.restructureIf(IfMakerHelper.java:88)
	at jadx.core.dex.visitors.regions.RegionMaker.processIf(RegionMaker.java:706)
	at jadx.core.dex.visitors.regions.RegionMaker.traverse(RegionMaker.java:155)
	at jadx.core.dex.visitors.regions.RegionMaker.makeRegion(RegionMaker.java:94)
	at jadx.core.dex.visitors.regions.RegionMaker.processIf(RegionMaker.java:730)
	at jadx.core.dex.visitors.regions.RegionMaker.traverse(RegionMaker.java:155)
	at jadx.core.dex.visitors.regions.RegionMaker.makeRegion(RegionMaker.java:94)
	at jadx.core.dex.visitors.regions.RegionMaker.processIf(RegionMaker.java:735)
	at jadx.core.dex.visitors.regions.RegionMaker.traverse(RegionMaker.java:155)
	at jadx.core.dex.visitors.regions.RegionMaker.makeRegion(RegionMaker.java:94)
	at jadx.core.dex.visitors.regions.RegionMaker.processIf(RegionMaker.java:730)
	at jadx.core.dex.visitors.regions.RegionMaker.traverse(RegionMaker.java:155)
	at jadx.core.dex.visitors.regions.RegionMaker.makeRegion(RegionMaker.java:94)
	at jadx.core.dex.visitors.regions.RegionMaker.processIf(RegionMaker.java:730)
	at jadx.core.dex.visitors.regions.RegionMaker.traverse(RegionMaker.java:155)
	at jadx.core.dex.visitors.regions.RegionMaker.makeRegion(RegionMaker.java:94)
	at jadx.core.dex.visitors.regions.RegionMaker.processIf(RegionMaker.java:730)
	at jadx.core.dex.visitors.regions.RegionMaker.traverse(RegionMaker.java:155)
	at jadx.core.dex.visitors.regions.RegionMaker.makeRegion(RegionMaker.java:94)
	at jadx.core.dex.visitors.regions.RegionMaker.processIf(RegionMaker.java:730)
	at jadx.core.dex.visitors.regions.RegionMaker.traverse(RegionMaker.java:155)
	at jadx.core.dex.visitors.regions.RegionMaker.makeRegion(RegionMaker.java:94)
	at jadx.core.dex.visitors.regions.RegionMaker.processIf(RegionMaker.java:730)
	at jadx.core.dex.visitors.regions.RegionMaker.traverse(RegionMaker.java:155)
	at jadx.core.dex.visitors.regions.RegionMaker.makeRegion(RegionMaker.java:94)
	at jadx.core.dex.visitors.regions.RegionMaker.processIf(RegionMaker.java:730)
	at jadx.core.dex.visitors.regions.RegionMaker.traverse(RegionMaker.java:155)
	at jadx.core.dex.visitors.regions.RegionMaker.makeRegion(RegionMaker.java:94)
	at jadx.core.dex.visitors.regions.RegionMaker.processIf(RegionMaker.java:730)
	at jadx.core.dex.visitors.regions.RegionMaker.traverse(RegionMaker.java:155)
	at jadx.core.dex.visitors.regions.RegionMaker.makeRegion(RegionMaker.java:94)
	at jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:52)
	at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:26)
	at jadx.core.dex.visitors.DepthTraversal.lambda$visit$1(DepthTraversal.java:14)
	at jadx.core.dex.visitors.DepthTraversal$$Lambda$379/0x0000000800e70440.accept(Unknown Source)
	at java.util.ArrayList.forEach(java.base@14.0.2/ArrayList.java:1511)
	at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)
	at jadx.core.ProcessClass.process(ProcessClass.java:62)
	- locked <0x00000004524f2760> (a jadx.core.dex.info.ClassInfo)
	at jadx.core.ProcessClass.generateCode(ProcessClass.java:101)
	at jadx.core.dex.nodes.ClassNode.decompile(ClassNode.java:356)
	- locked <0x00000004524f2aa8> (a jadx.core.dex.nodes.ClassNode)
	at jadx.core.dex.nodes.ClassNode.decompile(ClassNode.java:302)
	at jadx.api.JavaClass.decompile(JavaClass.java:59)
	at jadx.gui.jobs.DecompileTask.lambda$scheduleJobs$0(DecompileTask.java:62)
	at jadx.gui.jobs.DecompileTask$$Lambda$522/0x0000000800ea5040.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@14.0.2/ThreadPoolExecutor.java:1130)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@14.0.2/ThreadPoolExecutor.java:630)
	at java.lang.Thread.run(java.base@14.0.2/Thread.java:832)

After a few runs, it looks like it freezes somewhere in getPathCross(...)

APK: https://drive.google.com/file/d/1WXTJEMCzA-XVDWz4WdSYlnUMF8sAME0k/view?usp=sharing

@bagipro bagipro added bug Core Issues in jadx-core module labels Feb 1, 2022
@skylot
Copy link
Owner

skylot commented Feb 1, 2022

@bagipro thanks! I commit a quick workaround to prevent endless loop.
However, root cause is an incorrect loop detection (loops not detected at all), and it is similar to #1320, so I will close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Core Issues in jadx-core module
Projects
None yet
Development

No branches or pull requests

2 participants