avast / avast/retdec

Llvmir2hll: prevent invalid substitutions in CopyPropagation

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

Description

Modify `CopyPropagation` (or other analyses) to not perform invalid substitutions. E.g.:
```c
"abcd"[2] = 4;
```
```c
int32_t v12 = *NULL;
```
Invalid substitutions (where `CONST` is constant/literal):
```
CONST()
CONST[index]
CONST.index (zahrnuje CONST->index)
*CONST
&CONST
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the CopyPropagation analysis and inspect how it handles the listed constant expressions and dereferences. Reproduce the examples, then verify that invalid substitutions such as CONST(), CONST[index], CONST.index, *CONST, and &CONST are no longer performed.

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.