Skip to content

Commit

Permalink
[fix] Skip locations without targets
Browse files Browse the repository at this point in the history
  • Loading branch information
misonijnik committed Dec 16, 2022
1 parent 0aa8b15 commit 19a57ba
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/Core/TargetedExecutionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,11 @@ TargetedExecutionManager::prepareTargets(KModule *origModule, KModule *kmodule,
std::unordered_map<KFunction *, ref<TargetForest>> whitelists;
for (const auto &funcAndPaths : pathForest->layer) {
auto le = funcAndPaths.first;
auto kf = (*loc2targets[le]->begin())->getBlock()->parent;
ref<TargetForest> whitelist = new TargetForest(funcAndPaths.second, loc2targets, broken_traces, kf);
whitelists[kf] = whitelist;
if (loc2targets.count(le)) {
auto kf = (*loc2targets.at(le)->begin())->getBlock()->parent;
ref<TargetForest> whitelist = new TargetForest(funcAndPaths.second, loc2targets, broken_traces, kf);
whitelists[kf] = whitelist;
}
}

for (auto p : loc2targets)
Expand Down

0 comments on commit 19a57ba

Please sign in to comment.