Vector35 / Vector35/binaryninja-api
Common pattern should be simplified in HLIL
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 298
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 19
Description
Binary Ninja Version
2.4.2950-dev Personal
Describe the bug
Binja can't optimize IL that looks like this:
00000084 char temp211 = 0
00000084 if (arg1)
00000084 temp211 = 1
00000090 if (temp211 == 1)
00000090 return 1
0000008c return 0
To Reproduce
Steps to reproduce the behavior:
- Install https://github.com/google/binja-hexagon/ plugin
- Open https://github.com/google/binja-hexagon/blob/main/test_binaries/prebuilt/bn_llil_test_app in binja
- Navigate to
test_dualjump_cond_jumpfunction
Expected behavior
I want HLIL to look like:
00000084 if (arg1)
00000090 return 1
0000008c return 0
Version and Platform (required):
- Binary Ninja: 2.4.2950-dev Personal
- OS: Debian Linux
- Version Buster
Additional context
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue by opening test_binaries/prebuilt/bn_llil_test_app from the binja-hexagon plugin and navigating to test_dualjump_cond_jump. Compare the current HLIL with the expected form in the report; done means the temporary-variable pattern is simplified into the conditional return without regressing related HLIL behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- reverse-engineering
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100