From 540fca65afaff35343a938b86596b21f2e16b48d Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Fri, 28 Nov 2025 11:13:08 -0800 Subject: 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. --- plugins/rtti/itanium.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/rtti/itanium.cpp') 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
§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) -- cgit v1.3.1