Skip to content

Commit 464b9c3

Browse files
committed
Dataflow: Sync.
1 parent 32cb8f3 commit 464b9c3

31 files changed

+27239
-14768
lines changed

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

Lines changed: 1044 additions & 568 deletions
Large diffs are not rendered by default.

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

Lines changed: 1044 additions & 568 deletions
Large diffs are not rendered by default.

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

Lines changed: 1044 additions & 568 deletions
Large diffs are not rendered by default.

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

Lines changed: 1044 additions & 568 deletions
Large diffs are not rendered by default.

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,25 @@ private import DataFlowImplSpecific::Public
33
import Cached
44

55
module DataFlowImplCommonPublic {
6+
/** A state value to track during data flow. */
7+
abstract class FlowState extends string {
8+
bindingset[this]
9+
FlowState() { any() }
10+
}
11+
12+
/**
13+
* The default state, which is used when the state is unspecified for a source
14+
* or a sink.
15+
*/
16+
class FlowStateEmpty extends FlowState {
17+
FlowStateEmpty() { this = "" }
18+
}
19+
20+
// Dummy value to avoid misoptimizations when FlowState has size 1.
21+
private class FlowStateDummy extends FlowState {
22+
FlowStateDummy() { this = "dummy" }
23+
}
24+
625
private newtype TFlowFeature =
726
TFeatureHasSourceCallContext() or
827
TFeatureHasSinkCallContext() or

0 commit comments

Comments
 (0)