LLVM IR Corpus leads to cases where functions are not disassembled.
- Dominant language
- Python
- Stars
- 750
- Forks
- 87
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
As you may know, I developed a tool that creates an LLVM IR corpus for my master thesis @ HexHive :)
Some generated snippets resulted in an assertion error, I didn't have time to analyse the issue yet, so it might not be in scope of retrowrite.
Files to reproduce:
[reproducible.tar.gz](https://github.com/HexHive/retrowrite/files/6397730/reproducible.tar.gz)
```
$ clang -O2 -fPIE -fPIC -pie 1198a663f254851c2086795b4c8c54b50e067d7c_SCCP3633_2.c 1198a663f254851c2086795b4c8c54b50e067d7c.ll -o out
$ retrowrite out out.s
[*] Relocations for a section that's not loaded: .rela.dyn
[*] Relocations for a section that's not loaded: .rela.plt
[x] Could not replace value in .init_array
[x] Couldn't find valid section 3de8
[x] Couldn't find valid section 3fd8
[x] Couldn't find valid section 3fe0
[x] Couldn't find valid section 3fe8
[x] Couldn't find valid section 3ff0
[x] Couldn't find valid section 3ff8
Traceback (most recent call last):
File "path/to/retrowrite/retro/bin/retrowrite", line 176, in
rw.dump()
File "path/to/retrowrite/librw/rw.py", line 73, in dump
results.append("\t.text\n%s" % (function))
File "path/to/retrowrite/librw/container.py", line 172, in __str__
assert self.cache, "Function not disassembled!"
AssertionError: Function not disassembled!
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the reproducible.tar.gz archive and the documented clang/retrowrite command. Trace the failure through retro/bin/retrowrite, librw/rw.py, and librw/container.py, especially the assertion that a function was not disassembled. Done means the supplied input no longer aborts there and its functions are disassembled successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, python
- 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