Vector35 / Vector35/binaryninja-api
Shared Cache / Kernel Cache views should stop using `AddUserSection`
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 298
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 19
Description
The Shared Cache / Kernel Cache views currently use AddUserSection when loading images. For example:
This is because the sections need to be persisted in the database.
A side-effect of AddUserSection is that an undo entry is created. This is problematic for performance if the calls happen on a background thread, and it's not clear that it's even desirable. Loading a single image from a shared cache might create 20 sections and thus 20 undo actions.
When an alternative API to AddUserSection is added that allows persistence of sections without creating undo actions, Shared Cache / Kernel Cache should switch to it. This may come as part of https://github.com/Vector35/binaryninja-api/issues/6742.
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
Start with view/sharedcache/core/MachOProcessor.cpp around lines 249-251, then read issue #6742 for the alternative persistence API. Once that API is available, switch the Shared Cache and Kernel Cache view loading paths from AddUserSection; done means persisted sections no longer create undo actions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api, reverse-engineering
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100