[BUG] Segmentation fault in reassembled SPEC2006 binaries with asan tool
- Dominant language
- Python
- Stars
- 750
- Forks
- 87
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
When SPEC2006 benchmarks are rewritten using Retrowrite ASAN tool, and recompiled and run, I am getting "Segmentation Fault(core dumped)" .
**Describe how to reproduce the bug**
Step 1) for compiling PIE to be used as input to retrowrite ASAN tool
platform: x86-64
compiler: gcc 5.5
compiler flags: -O2 -PIE
benchmarks: SPEC2006 benchmarks: gcc, bzip2, ....
Step 2)
platform: x86-64
```
python3 -m rwtools.asan.asantool ./bzip2_base.gcc ./bzip2_base.gcc-asan
sed -i 's/asan_init_v4/asan_init/g' bzip2_base.gcc-asan.s
```
Step 3) For compiling -asan.s file generated by retrowrite
platform: x86-64
compiler: gcc 5.5
compiler flags: -O2
benchmarks: SPEC2006 benchmarks: gcc, bzip2, ....
Compile SPEC :
`gcc -g -o bzip2_base.gcc-asan -O2 bzip2_base.gcc-asan.s -pie -lasan -lm`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reported flow with rwtools.asan.asantool on the SPEC2006 bzip2 binary, then compile the generated bzip2_base.gcc-asan.s using the provided gcc command. Inspect where the rewritten binary fails at runtime and compare the generated assembly with the original execution path. Done means the reassembled ASAN-instrumented benchmark runs without a segmentation fault.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- reverse-engineering
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100