summaryrefslogtreecommitdiff
path: root/view/sharedcache/core/SharedCacheController.h
AgeCommit message (Collapse)Author
2026-03-30[DSC] Process Objective-C metadata when loading view from .bndbMark Rowe
The processed Objective-C metadata is not saved to the .bdnb. It must be recomputed when the view is loaded. Fixes https://github.com/Vector35/binaryninja-api/issues/8030.
2026-02-24[DSC] Simplify file mapping to fix intermittent unrelocated pointersMark Rowe
The `FileAccessorCache`'s LRU eviction could discard a file's mapped data after slide info had already been applied to it. Future accesses to the file produced a fresh mapping, but failed to reapply the slide info. This could result in pointers not correctly being slid, such as in https://github.com/Vector35/binaryninja-api/issues/7689. The LRU cache existed to stay within OS file descriptor limits, since the old `MappedFile` held its fd open for the lifetime of the mapping. There's no real reason for it to hold the file descriptor open like this. Closing it after `mmap` is sufficient to avoid the file descriptor limits. `MappedFileRegion` replaces the combination of `FileAccessorCache`, `WeakFileAccessor`, and `MappedFileAccessor`. It closes the fd immediately after mmap, so all files can stay mapped without consuming descriptors, making the cache unnecessary. `MappedFileRegion` is owned directly by the `CacheEntry` for its full lifetime. Slide info is applied exactly once to each `MappedFileRegion`.
2025-12-20Fix many of the warnings that show up when compiling with GCC 15.2Mark Rowe
2025-04-14[SharedCache] Evict file accessors from the global file accessor cache on ↵Mason Reed
file metadata destruction Previously we would just let them continue to exist after view destruction, this is fine assuming we expect the user to be re-opening the same cache over and over, but if a user wants to load a bunch of different caches they might want to evict the old file accessors so that COW pages are known to be evicted, along with other paged in memory.
2025-04-06[SharedCache] Add a named symbol mapMason Reed
Fixes https://github.com/Vector35/binaryninja-api/issues/6561 - Also tightens the SharedCache class to move only, to prevent accidental copies. - Also removes some extra copies in FFI when should pass by ref - Also adds `get_symbol_with_name` to python API The current named symbol map is populated in a worker thread spawned in the view init. This is because populating the map can take about 1 second. If we are fine with another 1 second added to the view init time then we can add it serially but I don't think this way is _that_ bad, no analysis consults this, however a user might add a workflow that would be racing this. So we need to add a mutex.
2025-04-02[SharedCache] Misc fixes and commentsMason Reed
2025-04-02[SharedCache] Fix some bugsMason Reed
2025-04-02[SharedCache] Refactor Shared CacheMason Reed
In absence of a better name, this commit refactors the shared cache code.