Skip to content

Commit dc88f71

Browse files
committed
C++: Fix join order.
1 parent da39c9f commit dc88f71

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cpp/ql/lib/semmle/code/cpp/controlflow/StackVariableReachability.qll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ abstract class StackVariableReachability extends string {
8080
j > i and
8181
sink = bb.getNode(j) and
8282
this.isSink(sink, v) and
83-
not exists(int k | this.isBarrier(bb.getNode(k), v) | k in [i + 1 .. j - 1])
83+
not exists(int k, ControlFlowNode node |
84+
node = bb.getNode(k) and this.isBarrier(pragma[only_bind_into](node), v)
85+
|
86+
k in [i + 1 .. j - 1]
87+
)
8488
)
8589
or
8690
not exists(int k | this.isBarrier(bb.getNode(k), v) | k > i) and

0 commit comments

Comments
 (0)