Skip to content

Commit 59aedc2

Browse files
authored
Merge pull request #8853 from aschackmull/dataflow/fix-join
Dataflow: Fix join-on-config producing a CP.
2 parents e7580b6 + c06efa1 commit 59aedc2

29 files changed

+145
-58
lines changed

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,10 @@ private module Stage1 {
903903
predicate revFlow(
904904
NodeEx node, FlowState state, boolean toReturn, ApOption returnAp, Ap ap, Configuration config
905905
) {
906-
revFlow(node, toReturn, config) and exists(state) and exists(returnAp) and exists(ap)
906+
revFlow(node, toReturn, pragma[only_bind_into](config)) and
907+
exists(state) and
908+
exists(returnAp) and
909+
exists(ap)
907910
}
908911

909912
private predicate throughFlowNodeCand(NodeEx node, Configuration config) {
@@ -1180,7 +1183,7 @@ private module Stage2 {
11801183

11811184
bindingset[node, state, ap, config]
11821185
private predicate filter(NodeEx node, FlowState state, Ap ap, Configuration config) {
1183-
PrevStage::revFlowState(state, config) and
1186+
PrevStage::revFlowState(state, pragma[only_bind_into](config)) and
11841187
exists(ap) and
11851188
not stateBarrier(node, state, config)
11861189
}

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,10 @@ private module Stage1 {
903903
predicate revFlow(
904904
NodeEx node, FlowState state, boolean toReturn, ApOption returnAp, Ap ap, Configuration config
905905
) {
906-
revFlow(node, toReturn, config) and exists(state) and exists(returnAp) and exists(ap)
906+
revFlow(node, toReturn, pragma[only_bind_into](config)) and
907+
exists(state) and
908+
exists(returnAp) and
909+
exists(ap)
907910
}
908911

909912
private predicate throughFlowNodeCand(NodeEx node, Configuration config) {
@@ -1180,7 +1183,7 @@ private module Stage2 {
11801183

11811184
bindingset[node, state, ap, config]
11821185
private predicate filter(NodeEx node, FlowState state, Ap ap, Configuration config) {
1183-
PrevStage::revFlowState(state, config) and
1186+
PrevStage::revFlowState(state, pragma[only_bind_into](config)) and
11841187
exists(ap) and
11851188
not stateBarrier(node, state, config)
11861189
}

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,10 @@ private module Stage1 {
903903
predicate revFlow(
904904
NodeEx node, FlowState state, boolean toReturn, ApOption returnAp, Ap ap, Configuration config
905905
) {
906-
revFlow(node, toReturn, config) and exists(state) and exists(returnAp) and exists(ap)
906+
revFlow(node, toReturn, pragma[only_bind_into](config)) and
907+
exists(state) and
908+
exists(returnAp) and
909+
exists(ap)
907910
}
908911

909912
private predicate throughFlowNodeCand(NodeEx node, Configuration config) {
@@ -1180,7 +1183,7 @@ private module Stage2 {
11801183

11811184
bindingset[node, state, ap, config]
11821185
private predicate filter(NodeEx node, FlowState state, Ap ap, Configuration config) {
1183-
PrevStage::revFlowState(state, config) and
1186+
PrevStage::revFlowState(state, pragma[only_bind_into](config)) and
11841187
exists(ap) and
11851188
not stateBarrier(node, state, config)
11861189
}

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,10 @@ private module Stage1 {
903903
predicate revFlow(
904904
NodeEx node, FlowState state, boolean toReturn, ApOption returnAp, Ap ap, Configuration config
905905
) {
906-
revFlow(node, toReturn, config) and exists(state) and exists(returnAp) and exists(ap)
906+
revFlow(node, toReturn, pragma[only_bind_into](config)) and
907+
exists(state) and
908+
exists(returnAp) and
909+
exists(ap)
907910
}
908911

909912
private predicate throughFlowNodeCand(NodeEx node, Configuration config) {
@@ -1180,7 +1183,7 @@ private module Stage2 {
11801183

11811184
bindingset[node, state, ap, config]
11821185
private predicate filter(NodeEx node, FlowState state, Ap ap, Configuration config) {
1183-
PrevStage::revFlowState(state, config) and
1186+
PrevStage::revFlowState(state, pragma[only_bind_into](config)) and
11841187
exists(ap) and
11851188
not stateBarrier(node, state, config)
11861189
}

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,10 @@ private module Stage1 {
903903
predicate revFlow(
904904
NodeEx node, FlowState state, boolean toReturn, ApOption returnAp, Ap ap, Configuration config
905905
) {
906-
revFlow(node, toReturn, config) and exists(state) and exists(returnAp) and exists(ap)
906+
revFlow(node, toReturn, pragma[only_bind_into](config)) and
907+
exists(state) and
908+
exists(returnAp) and
909+
exists(ap)
907910
}
908911

909912
private predicate throughFlowNodeCand(NodeEx node, Configuration config) {
@@ -1180,7 +1183,7 @@ private module Stage2 {
11801183

11811184
bindingset[node, state, ap, config]
11821185
private predicate filter(NodeEx node, FlowState state, Ap ap, Configuration config) {
1183-
PrevStage::revFlowState(state, config) and
1186+
PrevStage::revFlowState(state, pragma[only_bind_into](config)) and
11841187
exists(ap) and
11851188
not stateBarrier(node, state, config)
11861189
}

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,10 @@ private module Stage1 {
903903
predicate revFlow(
904904
NodeEx node, FlowState state, boolean toReturn, ApOption returnAp, Ap ap, Configuration config
905905
) {
906-
revFlow(node, toReturn, config) and exists(state) and exists(returnAp) and exists(ap)
906+
revFlow(node, toReturn, pragma[only_bind_into](config)) and
907+
exists(state) and
908+
exists(returnAp) and
909+
exists(ap)
907910
}
908911

909912
private predicate throughFlowNodeCand(NodeEx node, Configuration config) {
@@ -1180,7 +1183,7 @@ private module Stage2 {
11801183

11811184
bindingset[node, state, ap, config]
11821185
private predicate filter(NodeEx node, FlowState state, Ap ap, Configuration config) {
1183-
PrevStage::revFlowState(state, config) and
1186+
PrevStage::revFlowState(state, pragma[only_bind_into](config)) and
11841187
exists(ap) and
11851188
not stateBarrier(node, state, config)
11861189
}

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,10 @@ private module Stage1 {
903903
predicate revFlow(
904904
NodeEx node, FlowState state, boolean toReturn, ApOption returnAp, Ap ap, Configuration config
905905
) {
906-
revFlow(node, toReturn, config) and exists(state) and exists(returnAp) and exists(ap)
906+
revFlow(node, toReturn, pragma[only_bind_into](config)) and
907+
exists(state) and
908+
exists(returnAp) and
909+
exists(ap)
907910
}
908911

909912
private predicate throughFlowNodeCand(NodeEx node, Configuration config) {
@@ -1180,7 +1183,7 @@ private module Stage2 {
11801183

11811184
bindingset[node, state, ap, config]
11821185
private predicate filter(NodeEx node, FlowState state, Ap ap, Configuration config) {
1183-
PrevStage::revFlowState(state, config) and
1186+
PrevStage::revFlowState(state, pragma[only_bind_into](config)) and
11841187
exists(ap) and
11851188
not stateBarrier(node, state, config)
11861189
}

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,10 @@ private module Stage1 {
903903
predicate revFlow(
904904
NodeEx node, FlowState state, boolean toReturn, ApOption returnAp, Ap ap, Configuration config
905905
) {
906-
revFlow(node, toReturn, config) and exists(state) and exists(returnAp) and exists(ap)
906+
revFlow(node, toReturn, pragma[only_bind_into](config)) and
907+
exists(state) and
908+
exists(returnAp) and
909+
exists(ap)
907910
}
908911

909912
private predicate throughFlowNodeCand(NodeEx node, Configuration config) {
@@ -1180,7 +1183,7 @@ private module Stage2 {
11801183

11811184
bindingset[node, state, ap, config]
11821185
private predicate filter(NodeEx node, FlowState state, Ap ap, Configuration config) {
1183-
PrevStage::revFlowState(state, config) and
1186+
PrevStage::revFlowState(state, pragma[only_bind_into](config)) and
11841187
exists(ap) and
11851188
not stateBarrier(node, state, config)
11861189
}

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,10 @@ private module Stage1 {
903903
predicate revFlow(
904904
NodeEx node, FlowState state, boolean toReturn, ApOption returnAp, Ap ap, Configuration config
905905
) {
906-
revFlow(node, toReturn, config) and exists(state) and exists(returnAp) and exists(ap)
906+
revFlow(node, toReturn, pragma[only_bind_into](config)) and
907+
exists(state) and
908+
exists(returnAp) and
909+
exists(ap)
907910
}
908911

909912
private predicate throughFlowNodeCand(NodeEx node, Configuration config) {
@@ -1180,7 +1183,7 @@ private module Stage2 {
11801183

11811184
bindingset[node, state, ap, config]
11821185
private predicate filter(NodeEx node, FlowState state, Ap ap, Configuration config) {
1183-
PrevStage::revFlowState(state, config) and
1186+
PrevStage::revFlowState(state, pragma[only_bind_into](config)) and
11841187
exists(ap) and
11851188
not stateBarrier(node, state, config)
11861189
}

csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,10 @@ private module Stage1 {
903903
predicate revFlow(
904904
NodeEx node, FlowState state, boolean toReturn, ApOption returnAp, Ap ap, Configuration config
905905
) {
906-
revFlow(node, toReturn, config) and exists(state) and exists(returnAp) and exists(ap)
906+
revFlow(node, toReturn, pragma[only_bind_into](config)) and
907+
exists(state) and
908+
exists(returnAp) and
909+
exists(ap)
907910
}
908911

909912
private predicate throughFlowNodeCand(NodeEx node, Configuration config) {
@@ -1180,7 +1183,7 @@ private module Stage2 {
11801183

11811184
bindingset[node, state, ap, config]
11821185
private predicate filter(NodeEx node, FlowState state, Ap ap, Configuration config) {
1183-
PrevStage::revFlowState(state, config) and
1186+
PrevStage::revFlowState(state, pragma[only_bind_into](config)) and
11841187
exists(ap) and
11851188
not stateBarrier(node, state, config)
11861189
}

0 commit comments

Comments
 (0)