avast / avast/retdec

retdec-decompiler std::bad_alloc

Open
#1,031 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
8.6k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

I installed retdec with the AUR package [retdec-git](https://aur.archlinux.org/packages/retdec-git/), a few days ago and tried decompiling [Hitman 2](https://store.steampowered.com/app/863550/HITMAN_2/) to patch out always-online-DRM.
It just crashed, other executables work fine, though.

Retdec Output:
```
[kaki@arch HITMAN2]$ retdec-decompiler ./Retail/HITMAN2.exe
Running phase: Unpacking ( 0.02s )
No matching plugins found for 'MSVC'
No matching plugins found for 'Microsoft'
Running phase: Initialization ( 1.93s )
Running phase: Providers initialization ( 1.93s )
Running phase: Input binary to LLVM IR decoding ( 6.13s )
catched std::bad_alloc
[kaki@arch HITMAN2]$
```
`retdec-decompiler --version`:
```
RetDec version : v4.0-367-g5acc1bf6
Commit hash : 5acc1bf6d5420ce9e2686975c1134cc652afe34c
Build date : 2021-09-25T18:30:06Z
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the retdec-decompiler command and the reported Hitman2.exe output, then compare its decoding behavior with executables that work. Reproduce the std::bad_alloc failure and identify the input-decoding condition responsible; done means the executable no longer crashes during decompilation.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.