This repository was archived by the owner on Jul 11, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed
Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,17 @@ void Commands::analyzeStructures(BinaryViewRef bv)
2828 return ;
2929 }
3030
31+ SharedAnalysisInfo info;
3132 CustomTypes::defineAll (bv);
3233
33- auto file = std::make_shared<ObjectiveNinja::BinaryViewFile>(bv);
34- auto info = ObjectiveNinja::AnalysisProvider::infoForFile (file);
34+ try {
35+ auto file = std::make_shared<ObjectiveNinja::BinaryViewFile>(bv);
36+ info = ObjectiveNinja::AnalysisProvider::infoForFile (file);
3537
36- InfoHandler::applyInfoToView (info, bv);
38+ InfoHandler::applyInfoToView (info, bv);
39+ } catch (...) {
40+ BinaryNinja::LogError (" [Objective Ninja]: Error during analysis. Please report this bug!" );
41+ }
3742
3843 GlobalState::setFlag (bv, Flag::DidRunWorkflow);
3944}
Original file line number Diff line number Diff line change @@ -144,12 +144,17 @@ void Workflow::inlineMethodCalls(AnalysisContextRef ac)
144144 std::scoped_lock<std::mutex> lock (g_initialAnalysisMutex);
145145
146146 if (!GlobalState::hasAnalysisInfo (bv)) {
147+ SharedAnalysisInfo info;
147148 CustomTypes::defineAll (bv);
148149
149- auto file = std::make_shared<ObjectiveNinja::BinaryViewFile>(bv);
150- auto info = ObjectiveNinja::AnalysisProvider::infoForFile (file);
150+ try {
151+ auto file = std::make_shared<ObjectiveNinja::BinaryViewFile>(bv);
152+ info = ObjectiveNinja::AnalysisProvider::infoForFile (file);
151153
152- InfoHandler::applyInfoToView (info, bv);
154+ InfoHandler::applyInfoToView (info, bv);
155+ } catch (...) {
156+ BinaryNinja::LogError (" [Objective Ninja]: Error during analysis. Please report this bug!" );
157+ }
153158
154159 GlobalState::setFlag (bv, Flag::DidRunStructureAnalysis);
155160 GlobalState::storeAnalysisInfo (bv, info);
You can’t perform that action at this time.
0 commit comments