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)
28
28
return ;
29
29
}
30
30
31
+ SharedAnalysisInfo info;
31
32
CustomTypes::defineAll (bv);
32
33
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);
35
37
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
+ }
37
42
38
43
GlobalState::setFlag (bv, Flag::DidRunWorkflow);
39
44
}
Original file line number Diff line number Diff line change @@ -144,12 +144,17 @@ void Workflow::inlineMethodCalls(AnalysisContextRef ac)
144
144
std::scoped_lock<std::mutex> lock (g_initialAnalysisMutex);
145
145
146
146
if (!GlobalState::hasAnalysisInfo (bv)) {
147
+ SharedAnalysisInfo info;
147
148
CustomTypes::defineAll (bv);
148
149
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);
151
153
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
+ }
153
158
154
159
GlobalState::setFlag (bv, Flag::DidRunStructureAnalysis);
155
160
GlobalState::storeAnalysisInfo (bv, info);
You can’t perform that action at this time.
0 commit comments