File tree Expand file tree Collapse file tree 3 files changed +29
-1
lines changed
java/ql/lib/semmle/code/java/dataflow/internal Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,14 @@ signature module ConfigSig {
46
46
*/
47
47
default predicate allowImplicitRead ( Node node , ContentSet c ) { none ( ) }
48
48
49
+ /**
50
+ * Holds if `node` should never be skipped over in the `PathGraph` and in path
51
+ * explanations.
52
+ */
53
+ default predicate neverSkip ( Node node ) {
54
+ isAdditionalFlowStep ( node , _) or isAdditionalFlowStep ( _, node )
55
+ }
56
+
49
57
/**
50
58
* Gets the virtual dispatch branching limit when calculating field flow.
51
59
* This can be overridden to a smaller value to improve performance (a
@@ -141,6 +149,17 @@ signature module StateConfigSig {
141
149
*/
142
150
default predicate allowImplicitRead ( Node node , ContentSet c ) { none ( ) }
143
151
152
+ /**
153
+ * Holds if `node` should never be skipped over in the `PathGraph` and in path
154
+ * explanations.
155
+ */
156
+ default predicate neverSkip ( Node node ) {
157
+ isAdditionalFlowStep ( node , _) or
158
+ isAdditionalFlowStep ( _, node ) or
159
+ isAdditionalFlowStep ( node , _, _, _) or
160
+ isAdditionalFlowStep ( _, _, node , _)
161
+ }
162
+
144
163
/**
145
164
* Gets the virtual dispatch branching limit when calculating field flow.
146
165
* This can be overridden to a smaller value to improve performance (a
Original file line number Diff line number Diff line change @@ -66,6 +66,12 @@ signature module FullStateConfigSig {
66
66
*/
67
67
predicate allowImplicitRead ( Node node , ContentSet c ) ;
68
68
69
+ /**
70
+ * Holds if `node` should never be skipped over in the `PathGraph` and in path
71
+ * explanations.
72
+ */
73
+ predicate neverSkip ( Node node ) ;
74
+
69
75
/**
70
76
* Gets the virtual dispatch branching limit when calculating field flow.
71
77
* This can be overridden to a smaller value to improve performance (a
@@ -2024,7 +2030,8 @@ module Impl<FullStateConfigSig Config> {
2024
2030
castNode ( this .asNode ( ) ) or
2025
2031
clearsContentCached ( this .asNode ( ) , _) or
2026
2032
expectsContentCached ( this .asNode ( ) , _) or
2027
- neverSkipInPathGraph ( this .asNode ( ) )
2033
+ neverSkipInPathGraph ( this .asNode ( ) ) or
2034
+ Config:: neverSkip ( this .asNode ( ) )
2028
2035
}
2029
2036
}
2030
2037
Original file line number Diff line number Diff line change @@ -313,6 +313,8 @@ private module Config implements FullStateConfigSig {
313
313
any ( Configuration config ) .allowImplicitRead ( node , c )
314
314
}
315
315
316
+ predicate neverSkip ( Node node ) { none ( ) }
317
+
316
318
int fieldFlowBranchLimit ( ) { result = min ( any ( Configuration config ) .fieldFlowBranchLimit ( ) ) }
317
319
318
320
FlowFeature getAFeature ( ) { result = any ( Configuration config ) .getAFeature ( ) }
You can’t perform that action at this time.
0 commit comments