Skip to content

Commit c80627a

Browse files
committed
Dataflow: add plumbing for adding provenance to state-steps.
1 parent bee073d commit c80627a

File tree

32 files changed

+256
-121
lines changed

32 files changed

+256
-121
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,17 @@ deprecated private module Config implements FullStateConfigSig {
261261
model = ""
262262
}
263263

264-
predicate isAdditionalFlowStep(Node node1, FlowState state1, Node node2, FlowState state2) {
264+
predicate isAdditionalFlowStep(
265+
Node node1, FlowState state1, Node node2, FlowState state2, string model
266+
) {
265267
getConfig(state1).isAdditionalFlowStep(node1, getState(state1), node2, getState(state2)) and
266-
getConfig(state2) = getConfig(state1)
268+
getConfig(state2) = getConfig(state1) and
269+
model = ""
267270
or
268271
not singleConfiguration() and
269272
getConfig(state1).isAdditionalFlowStep(node1, node2) and
270-
state2 = state1
273+
state2 = state1 and
274+
model = ""
271275
}
272276

273277
predicate allowImplicitRead(Node node, ContentSet c) {

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,17 @@ deprecated private module Config implements FullStateConfigSig {
261261
model = ""
262262
}
263263

264-
predicate isAdditionalFlowStep(Node node1, FlowState state1, Node node2, FlowState state2) {
264+
predicate isAdditionalFlowStep(
265+
Node node1, FlowState state1, Node node2, FlowState state2, string model
266+
) {
265267
getConfig(state1).isAdditionalFlowStep(node1, getState(state1), node2, getState(state2)) and
266-
getConfig(state2) = getConfig(state1)
268+
getConfig(state2) = getConfig(state1) and
269+
model = ""
267270
or
268271
not singleConfiguration() and
269272
getConfig(state1).isAdditionalFlowStep(node1, node2) and
270-
state2 = state1
273+
state2 = state1 and
274+
model = ""
271275
}
272276

273277
predicate allowImplicitRead(Node node, ContentSet c) {

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,17 @@ deprecated private module Config implements FullStateConfigSig {
261261
model = ""
262262
}
263263

264-
predicate isAdditionalFlowStep(Node node1, FlowState state1, Node node2, FlowState state2) {
264+
predicate isAdditionalFlowStep(
265+
Node node1, FlowState state1, Node node2, FlowState state2, string model
266+
) {
265267
getConfig(state1).isAdditionalFlowStep(node1, getState(state1), node2, getState(state2)) and
266-
getConfig(state2) = getConfig(state1)
268+
getConfig(state2) = getConfig(state1) and
269+
model = ""
267270
or
268271
not singleConfiguration() and
269272
getConfig(state1).isAdditionalFlowStep(node1, node2) and
270-
state2 = state1
273+
state2 = state1 and
274+
model = ""
271275
}
272276

273277
predicate allowImplicitRead(Node node, ContentSet c) {

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,17 @@ deprecated private module Config implements FullStateConfigSig {
261261
model = ""
262262
}
263263

264-
predicate isAdditionalFlowStep(Node node1, FlowState state1, Node node2, FlowState state2) {
264+
predicate isAdditionalFlowStep(
265+
Node node1, FlowState state1, Node node2, FlowState state2, string model
266+
) {
265267
getConfig(state1).isAdditionalFlowStep(node1, getState(state1), node2, getState(state2)) and
266-
getConfig(state2) = getConfig(state1)
268+
getConfig(state2) = getConfig(state1) and
269+
model = ""
267270
or
268271
not singleConfiguration() and
269272
getConfig(state1).isAdditionalFlowStep(node1, node2) and
270-
state2 = state1
273+
state2 = state1 and
274+
model = ""
271275
}
272276

273277
predicate allowImplicitRead(Node node, ContentSet c) {

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,17 @@ deprecated private module Config implements FullStateConfigSig {
261261
model = ""
262262
}
263263

264-
predicate isAdditionalFlowStep(Node node1, FlowState state1, Node node2, FlowState state2) {
264+
predicate isAdditionalFlowStep(
265+
Node node1, FlowState state1, Node node2, FlowState state2, string model
266+
) {
265267
getConfig(state1).isAdditionalFlowStep(node1, getState(state1), node2, getState(state2)) and
266-
getConfig(state2) = getConfig(state1)
268+
getConfig(state2) = getConfig(state1) and
269+
model = ""
267270
or
268271
not singleConfiguration() and
269272
getConfig(state1).isAdditionalFlowStep(node1, node2) and
270-
state2 = state1
273+
state2 = state1 and
274+
model = ""
271275
}
272276

273277
predicate allowImplicitRead(Node node, ContentSet c) {

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,17 @@ deprecated private module Config implements FullStateConfigSig {
261261
model = ""
262262
}
263263

264-
predicate isAdditionalFlowStep(Node node1, FlowState state1, Node node2, FlowState state2) {
264+
predicate isAdditionalFlowStep(
265+
Node node1, FlowState state1, Node node2, FlowState state2, string model
266+
) {
265267
getConfig(state1).isAdditionalFlowStep(node1, getState(state1), node2, getState(state2)) and
266-
getConfig(state2) = getConfig(state1)
268+
getConfig(state2) = getConfig(state1) and
269+
model = ""
267270
or
268271
not singleConfiguration() and
269272
getConfig(state1).isAdditionalFlowStep(node1, node2) and
270-
state2 = state1
273+
state2 = state1 and
274+
model = ""
271275
}
272276

273277
predicate allowImplicitRead(Node node, ContentSet c) {

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,17 @@ deprecated private module Config implements FullStateConfigSig {
261261
model = ""
262262
}
263263

264-
predicate isAdditionalFlowStep(Node node1, FlowState state1, Node node2, FlowState state2) {
264+
predicate isAdditionalFlowStep(
265+
Node node1, FlowState state1, Node node2, FlowState state2, string model
266+
) {
265267
getConfig(state1).isAdditionalFlowStep(node1, getState(state1), node2, getState(state2)) and
266-
getConfig(state2) = getConfig(state1)
268+
getConfig(state2) = getConfig(state1) and
269+
model = ""
267270
or
268271
not singleConfiguration() and
269272
getConfig(state1).isAdditionalFlowStep(node1, node2) and
270-
state2 = state1
273+
state2 = state1 and
274+
model = ""
271275
}
272276

273277
predicate allowImplicitRead(Node node, ContentSet c) {

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,17 @@ deprecated private module Config implements FullStateConfigSig {
261261
model = ""
262262
}
263263

264-
predicate isAdditionalFlowStep(Node node1, FlowState state1, Node node2, FlowState state2) {
264+
predicate isAdditionalFlowStep(
265+
Node node1, FlowState state1, Node node2, FlowState state2, string model
266+
) {
265267
getConfig(state1).isAdditionalFlowStep(node1, getState(state1), node2, getState(state2)) and
266-
getConfig(state2) = getConfig(state1)
268+
getConfig(state2) = getConfig(state1) and
269+
model = ""
267270
or
268271
not singleConfiguration() and
269272
getConfig(state1).isAdditionalFlowStep(node1, node2) and
270-
state2 = state1
273+
state2 = state1 and
274+
model = ""
271275
}
272276

273277
predicate allowImplicitRead(Node node, ContentSet c) {

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,17 @@ deprecated private module Config implements FullStateConfigSig {
261261
model = ""
262262
}
263263

264-
predicate isAdditionalFlowStep(Node node1, FlowState state1, Node node2, FlowState state2) {
264+
predicate isAdditionalFlowStep(
265+
Node node1, FlowState state1, Node node2, FlowState state2, string model
266+
) {
265267
getConfig(state1).isAdditionalFlowStep(node1, getState(state1), node2, getState(state2)) and
266-
getConfig(state2) = getConfig(state1)
268+
getConfig(state2) = getConfig(state1) and
269+
model = ""
267270
or
268271
not singleConfiguration() and
269272
getConfig(state1).isAdditionalFlowStep(node1, node2) and
270-
state2 = state1
273+
state2 = state1 and
274+
model = ""
271275
}
272276

273277
predicate allowImplicitRead(Node node, ContentSet c) {

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,17 @@ deprecated private module Config implements FullStateConfigSig {
261261
model = ""
262262
}
263263

264-
predicate isAdditionalFlowStep(Node node1, FlowState state1, Node node2, FlowState state2) {
264+
predicate isAdditionalFlowStep(
265+
Node node1, FlowState state1, Node node2, FlowState state2, string model
266+
) {
265267
getConfig(state1).isAdditionalFlowStep(node1, getState(state1), node2, getState(state2)) and
266-
getConfig(state2) = getConfig(state1)
268+
getConfig(state2) = getConfig(state1) and
269+
model = ""
267270
or
268271
not singleConfiguration() and
269272
getConfig(state1).isAdditionalFlowStep(node1, node2) and
270-
state2 = state1
273+
state2 = state1 and
274+
model = ""
271275
}
272276

273277
predicate allowImplicitRead(Node node, ContentSet c) {

0 commit comments

Comments
 (0)