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

Quadratic Complexity in Decompiling simple but long function #7368

Open
fmagin opened this issue Jan 12, 2025 · 0 comments
Open

Quadratic Complexity in Decompiling simple but long function #7368

fmagin opened this issue Jan 12, 2025 · 0 comments
Assignees
Labels
Feature: Decompiler Status: Triage Information is being gathered

Comments

@fmagin
Copy link
Contributor

fmagin commented Jan 12, 2025

Describe the bug

Function decompilation of simple function calls leads to runaway complexity and takes too long

To Reproduce

Load attached archive, import binary and run auto analysis and then open the function FUN_0064d99c

Expected behavior

Decompilation in a reasonable amount of time.

Screenshots
image

Attachments

241216-h3jneszmd1_pw_infected (1).zip

Environment (please complete the following information):

  • OS: Arch Linux
  • Java Version: 21.0.5
  • Ghidra Version: 11.2.1
  • Ghidra Origin: official GitHub distro

Additional context

I experimented a bit and patched in a RET after certain lines to get some measurements of how the performance degrades over the length of this pattern:
This gives these rough measurements:
Lines, seconds
125 0.4
250 1.6
500 13
650 27
750 42
900 72
1000 118

Quickly plotting this makes it fairly clear that there is something quadratic going on here:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Decompiler Status: Triage Information is being gathered
Projects
None yet
Development

No branches or pull requests

3 participants