Skip to content

Commit a73eb99

Browse files
committed
Fixes wrong global lookup when global was not in the PTS
In cases where a global variable was not in the PTS the IDEInstInteractionAnalysis did not correctly generate taints for the specific instruction that loaded from the global.
1 parent ed67292 commit a73eb99

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Problems/IDEInstInteractionAnalysis.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,11 @@ class IDEInstInteractionAnalysisT
271271
container_type computeTargets(d_t src) override {
272272
container_type Facts;
273273
Facts.insert(src);
274-
if (PTS->count(src)) {
275-
Facts.insert(Load);
276-
}
274+
277275
// Handle global variables which behave a bit special.
278-
if (PTS->empty() && src == Load->getPointerOperand()) {
276+
if (src == Load->getPointerOperand()) {
277+
Facts.insert(Load);
278+
} else if (PTS->count(src)) {
279279
Facts.insert(Load);
280280
}
281281
return Facts;

0 commit comments

Comments
 (0)