@@ -254,6 +254,11 @@ module Impl<FullStateConfigSig Config> {
254
254
not fullBarrier ( node2 )
255
255
}
256
256
257
+ pragma [ nomagic]
258
+ private predicate isUnreachableInCall1 ( NodeEx n , LocalCallContextSpecificCall cc ) {
259
+ isUnreachableInCallCached ( n .asNode ( ) , cc .getCall ( ) )
260
+ }
261
+
257
262
/**
258
263
* Holds if data can flow in one local step from `node1` to `node2`.
259
264
*/
@@ -2108,7 +2113,7 @@ module Impl<FullStateConfigSig Config> {
2108
2113
NodeEx node1 , FlowState state , NodeEx node2 , boolean preservesValue , DataFlowType t ,
2109
2114
LocalCallContext cc
2110
2115
) {
2111
- not isUnreachableInCallCached ( node2 . asNode ( ) , cc . ( LocalCallContextSpecificCall ) . getCall ( ) ) and
2116
+ not isUnreachableInCall1 ( node2 , cc ) and
2112
2117
(
2113
2118
localFlowEntry ( node1 , pragma [ only_bind_into ] ( state ) ) and
2114
2119
(
@@ -2123,7 +2128,7 @@ module Impl<FullStateConfigSig Config> {
2123
2128
) and
2124
2129
node1 != node2 and
2125
2130
cc .relevantFor ( node1 .getEnclosingCallable ( ) ) and
2126
- not isUnreachableInCallCached ( node1 . asNode ( ) , cc . ( LocalCallContextSpecificCall ) . getCall ( ) )
2131
+ not isUnreachableInCall1 ( node1 , cc )
2127
2132
or
2128
2133
exists ( NodeEx mid |
2129
2134
localFlowStepPlus ( node1 , pragma [ only_bind_into ] ( state ) , mid , preservesValue , t , cc ) and
@@ -2160,10 +2165,8 @@ module Impl<FullStateConfigSig Config> {
2160
2165
preservesValue = false and
2161
2166
t = node2 .getDataFlowType ( ) and
2162
2167
callContext .relevantFor ( node1 .getEnclosingCallable ( ) ) and
2163
- not exists ( DataFlowCall call | call = callContext .( LocalCallContextSpecificCall ) .getCall ( ) |
2164
- isUnreachableInCallCached ( node1 .asNode ( ) , call ) or
2165
- isUnreachableInCallCached ( node2 .asNode ( ) , call )
2166
- )
2168
+ not isUnreachableInCall1 ( node1 , callContext ) and
2169
+ not isUnreachableInCall1 ( node2 , callContext )
2167
2170
}
2168
2171
}
2169
2172
0 commit comments