Option to automatically handle conditional jumps that are actually unconditional
See original GitHub issueCFR decompiles senseless if
s like iconst_0 iconst_0 if_icmpne L5
to
if (0 == 0) {
//this always happens
}
Please add an option to automatically handle unnecessary if instructions (interpret them as goto
, or not). This makes (poorly) obfuscated code easier to read without changing the instructions.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
MASM can automate jump-extending with errors?
The follow page in masm states the following: If a source file 8086-80286 program contains a conditional jump outside the range of -128...
Read more >Conditional Jumps Instructions
The most common way to transfer control in assembly language is to use a conditional jump. This is a two-step process: 1. First...
Read more >What is difference between conditional and unconditional ...
In unconditional jump program with definitely move to address specified in jump instruction but in conditional based on some condition only it will...
Read more >Conditional Execution - an overview | ScienceDirect Topics
Conditional execution controls whether or not the core will execute an instruction. Most instructions have a condition attribute that determines if the core ......
Read more >How a Jump Works
The machine cycle automatically executes instructions in sequence. When a jump instruction executes (in the last step of the machine cycle), it puts...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m actually ok with removing entirely trivial tautologies/oxymorons which don’t require program analysis - so, for example, I’m DEFINITELY not ok with
Even though it’s entirely obvious. (I should note, I do perform some limited program analysis, because without it Kotlin generates absolute junk sometimes - so following a conditional chain with literals is sometimes necessary).
however,
if (explicit literal integer condition involving no variables)
seems like a reasonable thing to handle in a “heavy” fallback pass, i.e. it’s all gone completely wrong, so let’s have a go at removing impossible code in case it’s making something look like a loop when it isn’t. (at this point it’s usually all about trying to de-spaghettify code)(should mention
--removedeadconditionals true
required, unless it’s triggered in a recovery pass.)