File tree Expand file tree Collapse file tree
csharp/ql/src/semmle/code/csharp/dataflow Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
2- "DataFlow Java/C++" : [
2+ "DataFlow Java/C++/C# " : [
33 " java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll" ,
44 " java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll" ,
55 " java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll" ,
1313 " cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll" ,
1414 " cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll" ,
1515 " cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll" ,
16- " csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll"
16+ " csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll" ,
17+ " csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll" ,
18+ " csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll" ,
19+ " csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll" ,
20+ " csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll"
1721 ],
18- "DataFlow Java/C++ Common" : [
22+ "DataFlow Java/C++/C# Common" : [
1923 " java/ql/src/semmle/code/java/dataflow/internal/DataFlowImplCommon.qll" ,
2024 " cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplCommon.qll" ,
2125 " cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImplCommon.qll" ,
Original file line number Diff line number Diff line change @@ -7,4 +7,23 @@ import csharp
77
88module DataFlow {
99 import semmle.code.csharp.dataflow.internal.DataFlowImpl
10+
11+ /**
12+ * This class exists to prevent mutual recursion between the user-overridden
13+ * member predicates of `Configuration` and the rest of the data-flow library.
14+ * Good performance cannot be guaranteed in the presence of such recursion, so
15+ * it should be replaced by using more than one copy of the data flow library.
16+ * Four copies are available: `DataFlow` through `DataFlow4`.
17+ */
18+ abstract private class ConfigurationRecursionPrevention extends Configuration {
19+ bindingset [ this ]
20+ ConfigurationRecursionPrevention ( ) { any ( ) }
21+
22+ override predicate hasFlow ( Node source , Node sink ) {
23+ strictcount ( Node n | this .isSource ( n ) ) < 0 or
24+ strictcount ( Node n | this .isSink ( n ) ) < 0 or
25+ strictcount ( Node n1 , Node n2 | this .isAdditionalFlowStep ( n1 , n2 ) ) < 0 or
26+ super .hasFlow ( source , sink )
27+ }
28+ }
1029}
Original file line number Diff line number Diff line change 1+ /**
2+ * Provides classes for performing local (intra-procedural) and
3+ * global (inter-procedural) data flow analyses.
4+ */
5+
6+ import csharp
7+
8+ module DataFlow2 {
9+ import semmle.code.csharp.dataflow.internal.DataFlowImpl2
10+
11+ /**
12+ * This class exists to prevent mutual recursion between the user-overridden
13+ * member predicates of `Configuration` and the rest of the data-flow library.
14+ * Good performance cannot be guaranteed in the presence of such recursion, so
15+ * it should be replaced by using more than one copy of the data flow library.
16+ * Four copies are available: `DataFlow` through `DataFlow4`.
17+ */
18+ abstract private class ConfigurationRecursionPrevention extends Configuration {
19+ bindingset [ this ]
20+ ConfigurationRecursionPrevention ( ) { any ( ) }
21+
22+ override predicate hasFlow ( Node source , Node sink ) {
23+ strictcount ( Node n | this .isSource ( n ) ) < 0 or
24+ strictcount ( Node n | this .isSink ( n ) ) < 0 or
25+ strictcount ( Node n1 , Node n2 | this .isAdditionalFlowStep ( n1 , n2 ) ) < 0 or
26+ super .hasFlow ( source , sink )
27+ }
28+ }
29+ }
Original file line number Diff line number Diff line change 1+ /**
2+ * Provides classes for performing local (intra-procedural) and
3+ * global (inter-procedural) data flow analyses.
4+ */
5+
6+ import csharp
7+
8+ module DataFlow3 {
9+ import semmle.code.csharp.dataflow.internal.DataFlowImpl3
10+
11+ /**
12+ * This class exists to prevent mutual recursion between the user-overridden
13+ * member predicates of `Configuration` and the rest of the data-flow library.
14+ * Good performance cannot be guaranteed in the presence of such recursion, so
15+ * it should be replaced by using more than one copy of the data flow library.
16+ * Four copies are available: `DataFlow` through `DataFlow4`.
17+ */
18+ abstract private class ConfigurationRecursionPrevention extends Configuration {
19+ bindingset [ this ]
20+ ConfigurationRecursionPrevention ( ) { any ( ) }
21+
22+ override predicate hasFlow ( Node source , Node sink ) {
23+ strictcount ( Node n | this .isSource ( n ) ) < 0 or
24+ strictcount ( Node n | this .isSink ( n ) ) < 0 or
25+ strictcount ( Node n1 , Node n2 | this .isAdditionalFlowStep ( n1 , n2 ) ) < 0 or
26+ super .hasFlow ( source , sink )
27+ }
28+ }
29+ }
Original file line number Diff line number Diff line change 1+ /**
2+ * Provides classes for performing local (intra-procedural) and
3+ * global (inter-procedural) data flow analyses.
4+ */
5+
6+ import csharp
7+
8+ module DataFlow4 {
9+ import semmle.code.csharp.dataflow.internal.DataFlowImpl4
10+
11+ /**
12+ * This class exists to prevent mutual recursion between the user-overridden
13+ * member predicates of `Configuration` and the rest of the data-flow library.
14+ * Good performance cannot be guaranteed in the presence of such recursion, so
15+ * it should be replaced by using more than one copy of the data flow library.
16+ * Four copies are available: `DataFlow` through `DataFlow4`.
17+ */
18+ abstract private class ConfigurationRecursionPrevention extends Configuration {
19+ bindingset [ this ]
20+ ConfigurationRecursionPrevention ( ) { any ( ) }
21+
22+ override predicate hasFlow ( Node source , Node sink ) {
23+ strictcount ( Node n | this .isSource ( n ) ) < 0 or
24+ strictcount ( Node n | this .isSink ( n ) ) < 0 or
25+ strictcount ( Node n1 , Node n2 | this .isAdditionalFlowStep ( n1 , n2 ) ) < 0 or
26+ super .hasFlow ( source , sink )
27+ }
28+ }
29+ }
Original file line number Diff line number Diff line change 1+ /**
2+ * Provides classes for performing local (intra-procedural) and
3+ * global (inter-procedural) data flow analyses.
4+ */
5+
6+ import csharp
7+
8+ module DataFlow5 {
9+ import semmle.code.csharp.dataflow.internal.DataFlowImpl5
10+
11+ /**
12+ * This class exists to prevent mutual recursion between the user-overridden
13+ * member predicates of `Configuration` and the rest of the data-flow library.
14+ * Good performance cannot be guaranteed in the presence of such recursion, so
15+ * it should be replaced by using more than one copy of the data flow library.
16+ * Four copies are available: `DataFlow` through `DataFlow4`.
17+ */
18+ abstract private class ConfigurationRecursionPrevention extends Configuration {
19+ bindingset [ this ]
20+ ConfigurationRecursionPrevention ( ) { any ( ) }
21+
22+ override predicate hasFlow ( Node source , Node sink ) {
23+ strictcount ( Node n | this .isSource ( n ) ) < 0 or
24+ strictcount ( Node n | this .isSink ( n ) ) < 0 or
25+ strictcount ( Node n1 , Node n2 | this .isAdditionalFlowStep ( n1 , n2 ) ) < 0 or
26+ super .hasFlow ( source , sink )
27+ }
28+ }
29+ }
You can’t perform that action at this time.
0 commit comments