@@ -1316,7 +1316,7 @@ module MakeImpl<InputSig Lang> {
1316
1316
)
1317
1317
or
1318
1318
// flow into a callable
1319
- fwdFlowIn ( _, node , state , _, cc , _, _, _, t , ap , apa ) and
1319
+ fwdFlowIn ( _, _ , node , state , _, cc , _, _, _, t , ap , apa , _ ) and
1320
1320
if PrevStage:: parameterMayFlowThrough ( node , apa )
1321
1321
then (
1322
1322
summaryCtx = TParamNodeSome ( node .asNode ( ) ) and
@@ -1476,15 +1476,14 @@ module MakeImpl<InputSig Lang> {
1476
1476
1477
1477
pragma [ nomagic]
1478
1478
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
1481
1482
) {
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
1488
1487
}
1489
1488
1490
1489
bindingset [ ctx, result ]
@@ -1535,6 +1534,7 @@ module MakeImpl<InputSig Lang> {
1535
1534
)
1536
1535
}
1537
1536
1537
+ pragma [ nomagic]
1538
1538
private predicate fwdFlowOut (
1539
1539
DataFlowCall call , DataFlowCallable inner , NodeEx out , FlowState state , CcNoCall outercc ,
1540
1540
ParamNodeOption summaryCtx , TypOption argT , ApOption argAp , Typ t , Ap ap , ApApprox apa
@@ -1557,11 +1557,9 @@ module MakeImpl<InputSig Lang> {
1557
1557
1558
1558
pragma [ nomagic]
1559
1559
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 , _)
1565
1563
)
1566
1564
}
1567
1565
@@ -1647,8 +1645,8 @@ module MakeImpl<InputSig Lang> {
1647
1645
ApOption argAp , ParamNodeEx p , Typ t , Ap ap
1648
1646
) {
1649
1647
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
1652
1650
PrevStage:: parameterMayFlowThrough ( p , apa ) and
1653
1651
PrevStage:: callMayFlowThroughRev ( call )
1654
1652
)
@@ -1802,7 +1800,7 @@ module MakeImpl<InputSig Lang> {
1802
1800
or
1803
1801
// flow out of a callable
1804
1802
exists ( ReturnPosition pos |
1805
- revFlowOut ( _, node , pos , state , _, _, ap ) and
1803
+ revFlowOut ( _, node , pos , state , _, _, _ , ap ) and
1806
1804
if returnFlowsThrough ( node , pos , state , _, _, _, _, ap )
1807
1805
then (
1808
1806
returnCtx = TReturnCtxMaybeFlowThrough ( pos ) and
@@ -1867,10 +1865,9 @@ module MakeImpl<InputSig Lang> {
1867
1865
1868
1866
pragma [ nomagic]
1869
1867
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 ( )
1874
1871
)
1875
1872
}
1876
1873
@@ -1925,9 +1922,9 @@ module MakeImpl<InputSig Lang> {
1925
1922
pragma [ nomagic]
1926
1923
private predicate revFlowOut (
1927
1924
DataFlowCall call , RetNodeEx ret , ReturnPosition pos , FlowState state ,
1928
- ReturnCtx returnCtx , ApOption returnAp , Ap ap
1925
+ ReturnCtx returnCtx , boolean cc , ApOption returnAp , Ap ap
1929
1926
) {
1930
- exists ( NodeEx out , boolean cc |
1927
+ exists ( NodeEx out |
1931
1928
revFlow ( out , state , returnCtx , returnAp , ap ) and
1932
1929
flowOutOfCallApValid ( call , ret , pos , out , ap , cc ) and
1933
1930
if returnCtx instanceof TReturnCtxNone then cc = false else cc = true
@@ -1963,7 +1960,7 @@ module MakeImpl<InputSig Lang> {
1963
1960
DataFlowCall call , ReturnCtx returnCtx , ApOption returnAp , ReturnPosition pos , Ap ap
1964
1961
) {
1965
1962
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
1967
1964
returnFlowsThrough ( ret , pos , state , ccc , _, _, _, ap ) and
1968
1965
matchesCall ( ccc , call )
1969
1966
)
0 commit comments