avast / avast/retdec

llvm2ir: the inlined function is missing?

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

Description

test.c:

![image](https://user-images.githubusercontent.com/32814917/163586119-86bf4768-b7c0-450a-952c-cf302bd912a2.png)
I compile test.c using "gcc -m32 -no-pie -fno-pic test.c -o gcc_32_O3 -O3". Function f is inlined in main. But I check by ida pro that function f still exists in gcc_32_O3 binary.
![image](https://user-images.githubusercontent.com/32814917/163586377-5b6c9dff-1a0f-4848-91ac-f560168bfc07.png)
Then I lift gcc_32_O3 using "retdec-decompiler.py gcc_32_O3".
The output .ll doesn't have the ir of function f.

![image](https://user-images.githubusercontent.com/32814917/163586206-51d02051-9391-496b-923a-6d32a8f684c8.png)

Was the way I lifted the gcc_32_O3 wrong? Or there is a bug?

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the report from test.c using the stated gcc command, then run retdec-decompiler.py on gcc_32_O3 and compare the binary view in IDA Pro with the generated .ll output. Determine whether the invocation is incorrect or whether the lifted output loses the inlined function, and document a minimal reproducible diagnosis.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
compilers, reverse-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.