Skip to content

Commit 3637914

Browse files
committed
Resync dataflow clone
1 parent afa8278 commit 3637914

File tree

1 file changed

+11
-28
lines changed

1 file changed

+11
-28
lines changed

java/ql/src/semmle/code/java/dataflow/internal/DataFlowImplForSerializability.qll

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -943,13 +943,8 @@ private module Stage2 {
943943
bindingset[call, c, outercc]
944944
private CcCall getCallContextCall(DataFlowCall call, DataFlowCallable c, Cc outercc) { any() }
945945

946-
bindingset[call, c]
947-
private CcNoCall getCallContextReturn(DataFlowCallable c, DataFlowCall call) { any() }
948-
949-
bindingset[innercc, inner, call]
950-
private predicate checkCallContextReturn(Cc innercc, DataFlowCallable inner, DataFlowCall call) {
951-
any()
952-
}
946+
bindingset[call, c, innercc]
947+
private CcNoCall getCallContextReturn(DataFlowCallable c, DataFlowCall call, Cc innercc) { any() }
953948

954949
bindingset[node, cc, config]
955950
private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() }
@@ -1122,8 +1117,7 @@ private module Stage2 {
11221117
fwdFlow(ret, innercc, argAp, ap, config) and
11231118
flowOutOfCall(call, ret, out, allowsFieldFlow, config) and
11241119
inner = ret.getEnclosingCallable() and
1125-
checkCallContextReturn(innercc, inner, call) and
1126-
ccOut = getCallContextReturn(inner, call)
1120+
ccOut = getCallContextReturn(inner, call, innercc)
11271121
|
11281122
ap instanceof ApNil or allowsFieldFlow = true
11291123
)
@@ -1615,13 +1609,8 @@ private module Stage3 {
16151609
bindingset[call, c, outercc]
16161610
private CcCall getCallContextCall(DataFlowCall call, DataFlowCallable c, Cc outercc) { any() }
16171611

1618-
bindingset[call, c]
1619-
private CcNoCall getCallContextReturn(DataFlowCallable c, DataFlowCall call) { any() }
1620-
1621-
bindingset[innercc, inner, call]
1622-
private predicate checkCallContextReturn(Cc innercc, DataFlowCallable inner, DataFlowCall call) {
1623-
any()
1624-
}
1612+
bindingset[call, c, innercc]
1613+
private CcNoCall getCallContextReturn(DataFlowCallable c, DataFlowCall call, Cc innercc) { any() }
16251614

16261615
bindingset[node, cc, config]
16271616
private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() }
@@ -1816,8 +1805,7 @@ private module Stage3 {
18161805
fwdFlow(ret, innercc, argAp, ap, config) and
18171806
flowOutOfCall(call, ret, out, allowsFieldFlow, config) and
18181807
inner = ret.getEnclosingCallable() and
1819-
checkCallContextReturn(innercc, inner, call) and
1820-
ccOut = getCallContextReturn(inner, call)
1808+
ccOut = getCallContextReturn(inner, call, innercc)
18211809
|
18221810
ap instanceof ApNil or allowsFieldFlow = true
18231811
)
@@ -2364,20 +2352,16 @@ private module Stage4 {
23642352

23652353
bindingset[call, c, outercc]
23662354
private CcCall getCallContextCall(DataFlowCall call, DataFlowCallable c, Cc outercc) {
2367-
c = resolveCall(call, outercc) and
2355+
checkCallContextCall(outercc, call, c) and
23682356
if recordDataFlowCallSite(call, c) then result = TSpecificCall(call) else result = TSomeCall()
23692357
}
23702358

2371-
bindingset[call, c]
2372-
private CcNoCall getCallContextReturn(DataFlowCallable c, DataFlowCall call) {
2359+
bindingset[call, c, innercc]
2360+
private CcNoCall getCallContextReturn(DataFlowCallable c, DataFlowCall call, Cc innercc) {
2361+
checkCallContextReturn(innercc, c, call) and
23732362
if reducedViableImplInReturn(c, call) then result = TReturn(c, call) else result = ccNone()
23742363
}
23752364

2376-
bindingset[innercc, inner, call]
2377-
private predicate checkCallContextReturn(Cc innercc, DataFlowCallable inner, DataFlowCall call) {
2378-
resolveReturn(innercc, inner, call)
2379-
}
2380-
23812365
bindingset[node, cc, config]
23822366
private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) {
23832367
localFlowEntry(node, config) and
@@ -2579,8 +2563,7 @@ private module Stage4 {
25792563
fwdFlow(ret, innercc, argAp, ap, config) and
25802564
flowOutOfCall(call, ret, out, allowsFieldFlow, config) and
25812565
inner = ret.getEnclosingCallable() and
2582-
checkCallContextReturn(innercc, inner, call) and
2583-
ccOut = getCallContextReturn(inner, call)
2566+
ccOut = getCallContextReturn(inner, call, innercc)
25842567
|
25852568
ap instanceof ApNil or allowsFieldFlow = true
25862569
)

0 commit comments

Comments
 (0)