Vector35 / Vector35/binaryninja-api
Undo of "push all types to archive" does not fully work
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: 6.0.10474-dev Ultimate (c9ea4d90)
- Edition: Ultimate
- OS: Arch Linux
- CPU Architecture: x64
User story:
Pushing a type to an archive is used to do two different things:
- adding a new type to the type archive, and
- synchronizing changes between the two copies of a type
Because of this, I occasionally find myself accidentally clicking on "push all types to archive", when I want to sync changes in all types that I have already added to the archive, only to immediately realize that this also adds all the types that weren't in the archive before.
Ultimately, this wouldn't be too bad, if this action was easily undone. However...
Bug Description:
After undoing "push all types to archive", the status of "has this type been modified, and does it need to be pushed and/or pulled", gets messed up.
Steps To Reproduce:
Please provide all steps required to reproduce the behavior:
0. Create a new type archive, say testing.bnta
- Create two empty structs, e.g.
aaatest1andaaatest2 - Right click on
aaatest1and select "push types to archive", choosingtesting.bntawhen prompted - Add a new field to
aaatest1, and observe that a "this type needs to be pushed" up-arrow icon appears next to it - Right click on
aaatest1and select "push all types to archive", again choosingtesting.bntaif prompted - Gah! Now
aaatest2is in the type archive. Press ctrl+Z. - Observe that a "merge conflict" up-and-down arrow icon now appears next to
aaatest1 - Moreover, note that while
aaatest2is not linked as being in the type archive anymore (no chain link icon), a copy of it is still present in the type archive.
Expected Behavior:
I expected Undo to return the type archive to the state from before the undone action.
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 in Binary Ninja using the listed type-archive steps, especially the “push all types to archive” action followed by Ctrl+Z. Start by tracing the undo behavior for that action and compare the linked-type status and archive contents before and after undo; done means both return to their pre-action state without a merge-conflict indicator.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100