Skip to content

Commit 890f96d

Browse files
authored
Python: Prevent bad joins in TypeBackTracker
Perhaps unsurprisingly, the join orderer was eager and willing to find the wrong join order in this predicate as well. Applying a similar fix to the one used in `TypeTracker::step` fixes the problem.
1 parent c0569da commit 890f96d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/ql/src/semmle/python/dataflow/new/TypeTracker.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,8 @@ class TypeBackTracker extends TTypeBackTracker {
411411
pragma[inline]
412412
TypeBackTracker step(LocalSourceNode nodeFrom, LocalSourceNode nodeTo) {
413413
exists(StepSummary summary |
414-
StepSummary::step(nodeFrom, nodeTo, summary) and
415-
this = result.prepend(summary)
414+
StepSummary::step(pragma[only_bind_out](nodeFrom), nodeTo, pragma[only_bind_into](summary)) and
415+
this = result.prepend(pragma[only_bind_into](summary))
416416
)
417417
}
418418

0 commit comments

Comments
 (0)