Incorrect decompile
- Dominant language
- C++
- Stars
- 8.6k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
I'm looking at a very simple arm binary and retdec appears to completely miss the conditional branch.
It gives this
```
// Address range: 0x1044c - 0x104a0
int main(int argc, char ** argv) {
int32_t str = 0; // bp-76
gets((char *)&str);
puts("\x48\x05\x01");
return 0;
}
```
Where it should have an `if` and `else` clause. Also, doesn't dereference the correct string for puts. This is the latest retdec build (compiled myself).
[stack0.zip](https://github.com/avast-tl/retdec/files/2289268/stack0.zip)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by unpacking stack0.zip and reproducing the decompilation with the latest self-built RetDec; compare the output around main with the reported missing conditional branch and incorrect puts string dereference. No source file or test is named, so trace the affected ARM decompilation path from the reproduction and verify both control flow and string handling when the output reflects the binary.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers, reverse-engineering
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100