avast / avast/retdec

Incorrect kind is set for the argument token in the JSON output

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

Description

RetDec emits incorrect kind for argument token in the JSON output.

Expected output:
```json
{
"kind": "i_fnc",
"val": "entry0"
},
{
"kind": "punc",
"val": "("
},
{
"kind": "type",
"val": "int64_t"
},
{
"kind": "ws",
"val": " "
},
{
"kind": **"i_arg",**
"val": "a1"
}
```

Output of RetDec:
```json
},
{
"kind": "i_fnc",
"val": "entry0"
},
{
"kind": "punc",
"val": "("
},
{
"kind": "type",
"val": "int64_t"
},
{
"kind": "ws",
"val": " "
},
{
"kind": **"i_lvar",**
"val": "a1"
}
```

https://github.com/avast/retdec/wiki/Decompiler-outputs

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the RetDec decompiler output documentation linked in the issue and trace how JSON tokens are classified for function arguments. Compare the reported output with the expected example, then verify that the argument token is emitted as "i_arg" rather than "i_lvar".

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.