@@ -1316,7 +1316,7 @@ module MakeImpl<InputSig Lang> {
13161316 )
13171317 or
13181318 // flow into a callable
1319- fwdFlowIn ( _, node , state , _, cc , _, _, _, t , ap , apa ) and
1319+ fwdFlowIn ( _, _ , node , state , _, cc , _, _, _, t , ap , apa , _ ) and
13201320 if PrevStage:: parameterMayFlowThrough ( node , apa )
13211321 then (
13221322 summaryCtx = TParamNodeSome ( node .asNode ( ) ) and
@@ -1476,15 +1476,14 @@ module MakeImpl<InputSig Lang> {
14761476
14771477 pragma [ nomagic]
14781478 private predicate fwdFlowIn (
1479- DataFlowCall call , ParamNodeEx p , FlowState state , Cc outercc , CcCall innercc ,
1480- ParamNodeOption summaryCtx , TypOption argT , ApOption argAp , Typ t , Ap ap , ApApprox apa
1479+ DataFlowCall call , DataFlowCallable inner , ParamNodeEx p , FlowState state , Cc outercc ,
1480+ CcCall innercc , ParamNodeOption summaryCtx , TypOption argT , ApOption argAp , Typ t , Ap ap ,
1481+ ApApprox apa , boolean cc
14811482 ) {
1482- exists ( DataFlowCallable inner , boolean cc |
1483- fwdFlowInCand ( call , inner , p , state , outercc , summaryCtx , argT , argAp , t , ap , apa ) and
1484- FwdTypeFlow:: typeFlowValidEdgeIn ( call , inner , cc ) and
1485- innercc = getCallContextCall ( call , inner ) and
1486- if outercc instanceof CcCall then cc = true else cc = false
1487- )
1483+ fwdFlowInCand ( call , inner , p , state , outercc , summaryCtx , argT , argAp , t , ap , apa ) and
1484+ FwdTypeFlow:: typeFlowValidEdgeIn ( call , inner , cc ) and
1485+ innercc = getCallContextCall ( call , inner ) and
1486+ if outercc instanceof CcCall then cc = true else cc = false
14881487 }
14891488
14901489 bindingset [ ctx, result ]
@@ -1535,6 +1534,7 @@ module MakeImpl<InputSig Lang> {
15351534 )
15361535 }
15371536
1537+ pragma [ nomagic]
15381538 private predicate fwdFlowOut (
15391539 DataFlowCall call , DataFlowCallable inner , NodeEx out , FlowState state , CcNoCall outercc ,
15401540 ParamNodeOption summaryCtx , TypOption argT , ApOption argAp , Typ t , Ap ap , ApApprox apa
@@ -1557,11 +1557,9 @@ module MakeImpl<InputSig Lang> {
15571557
15581558 pragma [ nomagic]
15591559 predicate dataFlowTakenCallEdgeIn ( DataFlowCall call , DataFlowCallable c , boolean cc ) {
1560- exists ( ParamNodeEx p , Cc outercc , FlowState state , Cc innercc , Typ t , Ap ap |
1561- fwdFlowIn ( call , p , state , outercc , innercc , _, _, _, t , ap , _) and
1562- fwdFlow1 ( p , state , innercc , _, _, _, t , _, ap , _) and
1563- c = p .getEnclosingCallable ( ) and
1564- if outercc instanceof CcCall then cc = true else cc = false
1560+ exists ( ParamNodeEx p , FlowState state , Cc innercc , Typ t , Ap ap |
1561+ fwdFlowIn ( call , c , p , state , _, innercc , _, _, _, t , ap , _, cc ) and
1562+ fwdFlow1 ( p , state , innercc , _, _, _, t , _, ap , _)
15651563 )
15661564 }
15671565
@@ -1647,8 +1645,8 @@ module MakeImpl<InputSig Lang> {
16471645 ApOption argAp , ParamNodeEx p , Typ t , Ap ap
16481646 ) {
16491647 exists ( ApApprox apa |
1650- fwdFlowIn ( call , pragma [ only_bind_into ] ( p ) , _, cc , innerCc , summaryCtx , argT , argAp , t ,
1651- ap , pragma [ only_bind_into ] ( apa ) ) and
1648+ fwdFlowIn ( call , _ , pragma [ only_bind_into ] ( p ) , _, cc , innerCc , summaryCtx , argT , argAp ,
1649+ t , ap , pragma [ only_bind_into ] ( apa ) , _ ) and
16521650 PrevStage:: parameterMayFlowThrough ( p , apa ) and
16531651 PrevStage:: callMayFlowThroughRev ( call )
16541652 )
@@ -1802,7 +1800,7 @@ module MakeImpl<InputSig Lang> {
18021800 or
18031801 // flow out of a callable
18041802 exists ( ReturnPosition pos |
1805- revFlowOut ( _, node , pos , state , _, _, ap ) and
1803+ revFlowOut ( _, node , pos , state , _, _, _ , ap ) and
18061804 if returnFlowsThrough ( node , pos , state , _, _, _, _, ap )
18071805 then (
18081806 returnCtx = TReturnCtxMaybeFlowThrough ( pos ) and
@@ -1867,10 +1865,9 @@ module MakeImpl<InputSig Lang> {
18671865
18681866 pragma [ nomagic]
18691867 predicate dataFlowTakenCallEdgeIn ( DataFlowCall call , DataFlowCallable c , boolean cc ) {
1870- exists ( RetNodeEx ret , ReturnCtx returnCtx |
1871- revFlowOut ( call , ret , _, _, returnCtx , _, _) and
1872- c = ret .getEnclosingCallable ( ) and
1873- if returnCtx instanceof TReturnCtxNone then cc = false else cc = true
1868+ exists ( RetNodeEx ret |
1869+ revFlowOut ( call , ret , _, _, _, cc , _, _) and
1870+ c = ret .getEnclosingCallable ( )
18741871 )
18751872 }
18761873
@@ -1925,9 +1922,9 @@ module MakeImpl<InputSig Lang> {
19251922 pragma [ nomagic]
19261923 private predicate revFlowOut (
19271924 DataFlowCall call , RetNodeEx ret , ReturnPosition pos , FlowState state ,
1928- ReturnCtx returnCtx , ApOption returnAp , Ap ap
1925+ ReturnCtx returnCtx , boolean cc , ApOption returnAp , Ap ap
19291926 ) {
1930- exists ( NodeEx out , boolean cc |
1927+ exists ( NodeEx out |
19311928 revFlow ( out , state , returnCtx , returnAp , ap ) and
19321929 flowOutOfCallApValid ( call , ret , pos , out , ap , cc ) and
19331930 if returnCtx instanceof TReturnCtxNone then cc = false else cc = true
@@ -1963,7 +1960,7 @@ module MakeImpl<InputSig Lang> {
19631960 DataFlowCall call , ReturnCtx returnCtx , ApOption returnAp , ReturnPosition pos , Ap ap
19641961 ) {
19651962 exists ( RetNodeEx ret , FlowState state , CcCall ccc |
1966- revFlowOut ( call , ret , pos , state , returnCtx , returnAp , ap ) and
1963+ revFlowOut ( call , ret , pos , state , returnCtx , _ , returnAp , ap ) and
19671964 returnFlowsThrough ( ret , pos , state , ccc , _, _, _, ap ) and
19681965 matchesCall ( ccc , call )
19691966 )
0 commit comments