[SharedCache] Reconsider use of BeginUndoActions
/ ForgetUndoActions
during shared cache loading / analysis
#6325
Labels
Component: DSC
Issue needs changes to the DyldSharedCacheView
Effort: Trivial
Issue should take < 1 day
Impact: Medium
Issue is impactful with a bad, or no, workaround
Version and Platform (required):
Bug Description:
The dyld shared cache plug-in contains a couple of locations where it does work that it brackets with
BeginUndoActions
/ForgetUndoActions
, such as:binaryninja-api/view/sharedcache/core/SharedCache.cpp
Lines 2954 to 2969 in 09ab887
binaryninja-api/view/sharedcache/core/ObjC.cpp
Lines 1433 to 1437 in 09ab887
From discussion on Slack, undo actions are tracked at the
BinaryView
level. Forgetting undo actions will forget actions performed outside of the local code, such as simultaneous operations performed by the user or by code running on other threads.Additionally,
BeginUndoActions
posts work to the main thread and waits for it to complete. This can pose a performance issue if the main thread is not idle.It would be worth revisiting what the use of
BeginUndoActions
/ForgetUndoActions
is trying to accomplish and seeing if there's an alternative solution that doesn't have these drawbacks (perhaps auto sections / symbols rather than user?).Slack discussions that touch on this:
https://binaryninja.slack.com/archives/C1E616ZSQ/p1734975321394819
https://binaryninja.slack.com/archives/C1E616ZSQ/p1735840209591709
The text was updated successfully, but these errors were encountered: