Vector35 / Vector35/binaryninja-api
"Display as enum member" affects array index in the same line as the enum constant
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 298
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 19
Description
Version and Platform (required):
- Binary Ninja Version: 4.2.5811-dev
- OS: Mac OS X
- OS Version: 14.5
- CPU Architecture: x64
Bug Description:
In HLIL, when setting an integer constant to be displayed as an enum member, if an array index in the same line has the same value as the enum member, it will also be displayed as an enum member instead of left as an integer index.
Steps To Reproduce:
Please provide all steps required to reproduce the behavior:
- Binary has an HLIL line such as
pollfd_array[1].events |= 1 - Right click on the furthest right
1and display as an enum member - Both
1s in the HLIL line are converted to be displayed enum members
Expected Behavior:
The array index should be left alone and only the 1 that I asked to display as an enum member should be updated.
Screenshots/Video Recording:
Before:
After:
Note the issue does happen when the array index is a different value than the enum member in the same HLIL line (see the second line in the screenshots). My enumeration has valid values for 0 and 1, but I do not see the same issue when the array index is different than the enum value in the same line.
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
No source files or tests are identified. Reproduce the HLIL case with an array index and enum value both set to 1, then trace the display-as-enum behavior from the relevant HLIL UI or API entry point. Done means only the selected constant is displayed as an enum member while the array index remains an integer.
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