diff options
| author | Mark Rowe <mark@vector35.com> | 2025-11-28 11:13:08 -0800 |
|---|---|---|
| committer | Mark Rowe <mark@vector35.com> | 2025-12-08 13:21:58 -0800 |
| commit | 540fca65afaff35343a938b86596b21f2e16b48d (patch) | |
| tree | f84da14232124ab1829f4051de2794b304355827 /plugins | |
| parent | daede114cfacf4cd68ed0a9f67c829b8b16da961 (diff) | |
Introduce an RAII type for managing bulk symbol modifications
Fixes https://github.com/Vector35/binaryninja-api/issues/7666.
Correctly managing the state of bulk symbol modifications via
`BeginBulkModifySymbols` / `EndBulkModifySymbols` is error-prone in the
face of exceptions and early returns. Leaking a bulk symbol modification
can leave the view in a state where no further changes to symbols will
be applied.
All users of the C++ API are encouraged to move from
`BeginBulkModifySymbols` / `EndBulkModifySymbols` to the new
`BulkSymbolModification` class.
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/rtti/itanium.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/rtti/itanium.cpp b/plugins/rtti/itanium.cpp index 63f2c563..34fd0f71 100644 --- a/plugins/rtti/itanium.cpp +++ b/plugins/rtti/itanium.cpp @@ -760,7 +760,7 @@ void ItaniumRTTIProcessor::ProcessRTTI() m_logger->LogWarn("Too many failed scans for section %llx... skipping", section->GetStart()); }; - m_view->BeginBulkModifySymbols(); + BulkSymbolModification bulkSymbolModification(m_view); // Scan data sections for rtti. for (const Ref<Section> §ion : m_view->GetSections()) { @@ -782,7 +782,7 @@ void ItaniumRTTIProcessor::ProcessRTTI() } } } - m_view->EndBulkModifySymbols(); + bulkSymbolModification.End(); // Go through all classes and recurse into the base classes using the base class name for (auto &[classAddr, classInfo]: m_classInfo) |
