Skip to content

Commit c45d571

Browse files
committed
Fix bad join order
1 parent a4578d7 commit c45d571

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

go/ql/lib/semmle/go/dataflow/internal/DataFlowPrivate.qll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ private Field getASparselyUsedChannelTypedField() {
103103
count(result.getARead()) = 2
104104
}
105105

106+
bindingset[v]
107+
pragma[inline_late]
108+
private predicate jumpStepHelper(ValueEntity v, Node n) { n = v.getARead() }
109+
106110
/**
107111
* Holds if data can flow from `node1` to `node2` in a way that loses the
108112
* calling context. For example, this would happen with flow through a
@@ -117,7 +121,7 @@ predicate jumpStep(Node n1, Node n2) {
117121
or
118122
n1.(DataFlow::PostUpdateNode).getPreUpdateNode() = v.getARead()
119123
) and
120-
n2 = v.getARead()
124+
jumpStepHelper(v, n2)
121125
)
122126
or
123127
exists(SsaDefinition pred, SsaDefinition succ |

0 commit comments

Comments
 (0)