@@ -1151,18 +1151,18 @@ private predicate reachableFromInput(
1151
1151
}
1152
1152
1153
1153
/**
1154
- * Holds if there is a level step from `pred ` to `succ ` under `cfg` that can be appended
1155
- * to a path represented by `oldSummary` yielding a path represented by `newSummary `.
1154
+ * Holds if there is a level step from `mid ` to `nd ` under `cfg` that can be appended
1155
+ * to a path represented by `oldSummary` yielding a path represented by `summary `.
1156
1156
*/
1157
- pragma [ noinline ]
1157
+ pragma [ noopt ]
1158
1158
private predicate appendStep (
1159
- DataFlow:: Node pred , DataFlow:: Configuration cfg , PathSummary oldSummary , DataFlow:: Node succ ,
1160
- PathSummary newSummary
1159
+ DataFlow:: Node mid , DataFlow:: Configuration cfg , PathSummary oldSummary , DataFlow:: Node nd ,
1160
+ PathSummary summary
1161
1161
) {
1162
1162
exists ( PathSummary stepSummary |
1163
- flowStep ( pred , cfg , succ , stepSummary ) and
1163
+ flowStep ( mid , cfg , nd , stepSummary ) and
1164
1164
stepSummary .isLevel ( ) and
1165
- newSummary = oldSummary .append ( stepSummary )
1165
+ summary = oldSummary .append ( stepSummary )
1166
1166
)
1167
1167
}
1168
1168
@@ -1301,6 +1301,13 @@ private predicate reachesReturn(
1301
1301
summary = PathSummary:: level ( ) and
1302
1302
callInputStep ( f , _, _, _, _) // check that a relevant result can exist.
1303
1303
or
1304
+ reachesReturnRec ( f , read , cfg , summary )
1305
+ }
1306
+
1307
+ pragma [ noopt]
1308
+ private predicate reachesReturnRec (
1309
+ Function f , DataFlow:: Node read , DataFlow:: Configuration cfg , PathSummary summary
1310
+ ) {
1304
1311
exists ( DataFlow:: Node mid , PathSummary oldSummary , PathSummary newSummary |
1305
1312
flowStep ( read , cfg , mid , oldSummary ) and
1306
1313
reachesReturn ( f , mid , cfg , newSummary ) and
@@ -1591,6 +1598,7 @@ private predicate flowIntoHigherOrderCall(
1591
1598
* Holds if there is a flow step from `pred` to `succ` described by `summary`
1592
1599
* under configuration `cfg`.
1593
1600
*/
1601
+ pragma [ noinline]
1594
1602
private predicate flowStep (
1595
1603
DataFlow:: Node pred , DataFlow:: Configuration cfg , DataFlow:: Node succ , PathSummary summary
1596
1604
) {
0 commit comments