avast / avast/retdec

DSM file contains question marks instead of bytes

Open
#86 1 comment 0 reactions 0 assignees View on GitHub
bug C-bin2llvmir P-output
Dominant language
C++
Stars
8.6k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

When decompiling the COFF file below, the produced `.dsm` file contains question marks instead of bytes.

## Input

```sh
$ decompile.sh x86-coff
```
where the input COFF file can be downloaded [here](https://github.com/avast-tl/retdec-regression-tests/raw/68e8849c1aba5a7a8592698ed56fe582ce087769/service/decompiler/recognition/x86-coff).

## Output

The produced `.dsm` file contains the following lines:
```
; section: .data
0xc0: ?? |? |
; section: .rdata
0xc0: ?? 63 6b 65 72 6d 61 6e 28 20 25 64 20 2c 20 25 |?ckerman( %d , %|
```

## Expected output

I would expect byte numbers instead of `??` and proper ASCII characters instead of `?` in between the pipes (`|`).

## Configuration

* Commit: 8c4b23dbbf0f2baaf6f2309fc189b054f58250ea (current `master`)
* 64b Arch Linux, GCC 7.2.1, Debug build of RetDec

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the problem with decompile.sh x86-coff using the linked COFF input and inspect the generated .dsm output for the .data and .rdata sections. Trace how bytes and ASCII text are rendered there, then verify that byte values and printable characters replace the question marks in the expected output.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
reverse-engineering
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.