From b1245eeac84f8bdb0d937089c352543b684f69b4 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Fri, 29 Nov 2019 11:30:55 +0100 Subject: [PATCH 1/3] Data flow: Various performance tweaks --- .../csharp/dataflow/internal/DataFlowImpl.qll | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll index 9519a74265f..d96a4104d84 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll @@ -510,13 +510,20 @@ private predicate simpleParameterFlow( pragma[noinline] private predicate simpleArgumentFlowsThrough0( + ParameterNode p, ReturnNode ret, ReturnKind kind, DataFlowType t, Configuration config +) { + simpleParameterFlow(p, ret, t, config) and + kind = ret.getKind() +} + +pragma[noinline] +private predicate simpleArgumentFlowsThrough1( DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowType t, Configuration config ) { nodeCand1(arg, unbind(config)) and not outBarrier(arg, config) and exists(ParameterNode p, ReturnNode ret | - simpleParameterFlow(p, ret, t, config) and - kind = ret.getKind() and + simpleArgumentFlowsThrough0(p, ret, kind, t, config) and viableParamArg(call, p, arg) ) } @@ -534,7 +541,7 @@ private predicate simpleArgumentFlowsThrough( exists(DataFlowCall call, ReturnKind kind | nodeCand1(out, unbind(config)) and not inBarrier(out, config) and - simpleArgumentFlowsThrough0(call, arg, kind, t, config) and + simpleArgumentFlowsThrough1(call, arg, kind, t, config) and out = getAnOutNode(call, kind) ) } @@ -1529,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(node, f, toReturn, ap0, config) and + flowStore(ap0, f, node, toReturn, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(node, f, toReturn, ap0, config) and + flowRead(f, ap0, node, toReturn, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1551,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config ) { exists(Node mid | read(node, f, mid) and From 5baa133e6ca678f34f37109a5b2467f28bf58463 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Fri, 29 Nov 2019 11:33:05 +0100 Subject: [PATCH 2/3] Data flow: Sync files --- .../cpp/dataflow/internal/DataFlowImpl.qll | 21 ++++++++++++------- .../cpp/dataflow/internal/DataFlowImpl2.qll | 21 ++++++++++++------- .../cpp/dataflow/internal/DataFlowImpl3.qll | 21 ++++++++++++------- .../cpp/dataflow/internal/DataFlowImpl4.qll | 21 ++++++++++++------- .../dataflow/internal/DataFlowImplLocal.qll | 21 ++++++++++++------- .../cpp/ir/dataflow/internal/DataFlowImpl.qll | 21 ++++++++++++------- .../ir/dataflow/internal/DataFlowImpl2.qll | 21 ++++++++++++------- .../ir/dataflow/internal/DataFlowImpl3.qll | 21 ++++++++++++------- .../ir/dataflow/internal/DataFlowImpl4.qll | 21 ++++++++++++------- .../dataflow/internal/DataFlowImpl2.qll | 21 ++++++++++++------- .../dataflow/internal/DataFlowImpl3.qll | 21 ++++++++++++------- .../dataflow/internal/DataFlowImpl4.qll | 21 ++++++++++++------- .../dataflow/internal/DataFlowImpl5.qll | 21 ++++++++++++------- .../java/dataflow/internal/DataFlowImpl.qll | 21 ++++++++++++------- .../java/dataflow/internal/DataFlowImpl2.qll | 21 ++++++++++++------- .../java/dataflow/internal/DataFlowImpl3.qll | 21 ++++++++++++------- .../java/dataflow/internal/DataFlowImpl4.qll | 21 ++++++++++++------- .../java/dataflow/internal/DataFlowImpl5.qll | 21 ++++++++++++------- 18 files changed, 252 insertions(+), 126 deletions(-) diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll index 9519a74265f..d96a4104d84 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll @@ -510,13 +510,20 @@ private predicate simpleParameterFlow( pragma[noinline] private predicate simpleArgumentFlowsThrough0( + ParameterNode p, ReturnNode ret, ReturnKind kind, DataFlowType t, Configuration config +) { + simpleParameterFlow(p, ret, t, config) and + kind = ret.getKind() +} + +pragma[noinline] +private predicate simpleArgumentFlowsThrough1( DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowType t, Configuration config ) { nodeCand1(arg, unbind(config)) and not outBarrier(arg, config) and exists(ParameterNode p, ReturnNode ret | - simpleParameterFlow(p, ret, t, config) and - kind = ret.getKind() and + simpleArgumentFlowsThrough0(p, ret, kind, t, config) and viableParamArg(call, p, arg) ) } @@ -534,7 +541,7 @@ private predicate simpleArgumentFlowsThrough( exists(DataFlowCall call, ReturnKind kind | nodeCand1(out, unbind(config)) and not inBarrier(out, config) and - simpleArgumentFlowsThrough0(call, arg, kind, t, config) and + simpleArgumentFlowsThrough1(call, arg, kind, t, config) and out = getAnOutNode(call, kind) ) } @@ -1529,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(node, f, toReturn, ap0, config) and + flowStore(ap0, f, node, toReturn, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(node, f, toReturn, ap0, config) and + flowRead(f, ap0, node, toReturn, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1551,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll index 9519a74265f..d96a4104d84 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll @@ -510,13 +510,20 @@ private predicate simpleParameterFlow( pragma[noinline] private predicate simpleArgumentFlowsThrough0( + ParameterNode p, ReturnNode ret, ReturnKind kind, DataFlowType t, Configuration config +) { + simpleParameterFlow(p, ret, t, config) and + kind = ret.getKind() +} + +pragma[noinline] +private predicate simpleArgumentFlowsThrough1( DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowType t, Configuration config ) { nodeCand1(arg, unbind(config)) and not outBarrier(arg, config) and exists(ParameterNode p, ReturnNode ret | - simpleParameterFlow(p, ret, t, config) and - kind = ret.getKind() and + simpleArgumentFlowsThrough0(p, ret, kind, t, config) and viableParamArg(call, p, arg) ) } @@ -534,7 +541,7 @@ private predicate simpleArgumentFlowsThrough( exists(DataFlowCall call, ReturnKind kind | nodeCand1(out, unbind(config)) and not inBarrier(out, config) and - simpleArgumentFlowsThrough0(call, arg, kind, t, config) and + simpleArgumentFlowsThrough1(call, arg, kind, t, config) and out = getAnOutNode(call, kind) ) } @@ -1529,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(node, f, toReturn, ap0, config) and + flowStore(ap0, f, node, toReturn, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(node, f, toReturn, ap0, config) and + flowRead(f, ap0, node, toReturn, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1551,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll index 9519a74265f..d96a4104d84 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll @@ -510,13 +510,20 @@ private predicate simpleParameterFlow( pragma[noinline] private predicate simpleArgumentFlowsThrough0( + ParameterNode p, ReturnNode ret, ReturnKind kind, DataFlowType t, Configuration config +) { + simpleParameterFlow(p, ret, t, config) and + kind = ret.getKind() +} + +pragma[noinline] +private predicate simpleArgumentFlowsThrough1( DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowType t, Configuration config ) { nodeCand1(arg, unbind(config)) and not outBarrier(arg, config) and exists(ParameterNode p, ReturnNode ret | - simpleParameterFlow(p, ret, t, config) and - kind = ret.getKind() and + simpleArgumentFlowsThrough0(p, ret, kind, t, config) and viableParamArg(call, p, arg) ) } @@ -534,7 +541,7 @@ private predicate simpleArgumentFlowsThrough( exists(DataFlowCall call, ReturnKind kind | nodeCand1(out, unbind(config)) and not inBarrier(out, config) and - simpleArgumentFlowsThrough0(call, arg, kind, t, config) and + simpleArgumentFlowsThrough1(call, arg, kind, t, config) and out = getAnOutNode(call, kind) ) } @@ -1529,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(node, f, toReturn, ap0, config) and + flowStore(ap0, f, node, toReturn, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(node, f, toReturn, ap0, config) and + flowRead(f, ap0, node, toReturn, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1551,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll index 9519a74265f..d96a4104d84 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll @@ -510,13 +510,20 @@ private predicate simpleParameterFlow( pragma[noinline] private predicate simpleArgumentFlowsThrough0( + ParameterNode p, ReturnNode ret, ReturnKind kind, DataFlowType t, Configuration config +) { + simpleParameterFlow(p, ret, t, config) and + kind = ret.getKind() +} + +pragma[noinline] +private predicate simpleArgumentFlowsThrough1( DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowType t, Configuration config ) { nodeCand1(arg, unbind(config)) and not outBarrier(arg, config) and exists(ParameterNode p, ReturnNode ret | - simpleParameterFlow(p, ret, t, config) and - kind = ret.getKind() and + simpleArgumentFlowsThrough0(p, ret, kind, t, config) and viableParamArg(call, p, arg) ) } @@ -534,7 +541,7 @@ private predicate simpleArgumentFlowsThrough( exists(DataFlowCall call, ReturnKind kind | nodeCand1(out, unbind(config)) and not inBarrier(out, config) and - simpleArgumentFlowsThrough0(call, arg, kind, t, config) and + simpleArgumentFlowsThrough1(call, arg, kind, t, config) and out = getAnOutNode(call, kind) ) } @@ -1529,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(node, f, toReturn, ap0, config) and + flowStore(ap0, f, node, toReturn, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(node, f, toReturn, ap0, config) and + flowRead(f, ap0, node, toReturn, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1551,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll index 9519a74265f..d96a4104d84 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll @@ -510,13 +510,20 @@ private predicate simpleParameterFlow( pragma[noinline] private predicate simpleArgumentFlowsThrough0( + ParameterNode p, ReturnNode ret, ReturnKind kind, DataFlowType t, Configuration config +) { + simpleParameterFlow(p, ret, t, config) and + kind = ret.getKind() +} + +pragma[noinline] +private predicate simpleArgumentFlowsThrough1( DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowType t, Configuration config ) { nodeCand1(arg, unbind(config)) and not outBarrier(arg, config) and exists(ParameterNode p, ReturnNode ret | - simpleParameterFlow(p, ret, t, config) and - kind = ret.getKind() and + simpleArgumentFlowsThrough0(p, ret, kind, t, config) and viableParamArg(call, p, arg) ) } @@ -534,7 +541,7 @@ private predicate simpleArgumentFlowsThrough( exists(DataFlowCall call, ReturnKind kind | nodeCand1(out, unbind(config)) and not inBarrier(out, config) and - simpleArgumentFlowsThrough0(call, arg, kind, t, config) and + simpleArgumentFlowsThrough1(call, arg, kind, t, config) and out = getAnOutNode(call, kind) ) } @@ -1529,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(node, f, toReturn, ap0, config) and + flowStore(ap0, f, node, toReturn, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(node, f, toReturn, ap0, config) and + flowRead(f, ap0, node, toReturn, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1551,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll index 9519a74265f..d96a4104d84 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll @@ -510,13 +510,20 @@ private predicate simpleParameterFlow( pragma[noinline] private predicate simpleArgumentFlowsThrough0( + ParameterNode p, ReturnNode ret, ReturnKind kind, DataFlowType t, Configuration config +) { + simpleParameterFlow(p, ret, t, config) and + kind = ret.getKind() +} + +pragma[noinline] +private predicate simpleArgumentFlowsThrough1( DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowType t, Configuration config ) { nodeCand1(arg, unbind(config)) and not outBarrier(arg, config) and exists(ParameterNode p, ReturnNode ret | - simpleParameterFlow(p, ret, t, config) and - kind = ret.getKind() and + simpleArgumentFlowsThrough0(p, ret, kind, t, config) and viableParamArg(call, p, arg) ) } @@ -534,7 +541,7 @@ private predicate simpleArgumentFlowsThrough( exists(DataFlowCall call, ReturnKind kind | nodeCand1(out, unbind(config)) and not inBarrier(out, config) and - simpleArgumentFlowsThrough0(call, arg, kind, t, config) and + simpleArgumentFlowsThrough1(call, arg, kind, t, config) and out = getAnOutNode(call, kind) ) } @@ -1529,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(node, f, toReturn, ap0, config) and + flowStore(ap0, f, node, toReturn, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(node, f, toReturn, ap0, config) and + flowRead(f, ap0, node, toReturn, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1551,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll index 9519a74265f..d96a4104d84 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll @@ -510,13 +510,20 @@ private predicate simpleParameterFlow( pragma[noinline] private predicate simpleArgumentFlowsThrough0( + ParameterNode p, ReturnNode ret, ReturnKind kind, DataFlowType t, Configuration config +) { + simpleParameterFlow(p, ret, t, config) and + kind = ret.getKind() +} + +pragma[noinline] +private predicate simpleArgumentFlowsThrough1( DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowType t, Configuration config ) { nodeCand1(arg, unbind(config)) and not outBarrier(arg, config) and exists(ParameterNode p, ReturnNode ret | - simpleParameterFlow(p, ret, t, config) and - kind = ret.getKind() and + simpleArgumentFlowsThrough0(p, ret, kind, t, config) and viableParamArg(call, p, arg) ) } @@ -534,7 +541,7 @@ private predicate simpleArgumentFlowsThrough( exists(DataFlowCall call, ReturnKind kind | nodeCand1(out, unbind(config)) and not inBarrier(out, config) and - simpleArgumentFlowsThrough0(call, arg, kind, t, config) and + simpleArgumentFlowsThrough1(call, arg, kind, t, config) and out = getAnOutNode(call, kind) ) } @@ -1529,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(node, f, toReturn, ap0, config) and + flowStore(ap0, f, node, toReturn, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(node, f, toReturn, ap0, config) and + flowRead(f, ap0, node, toReturn, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1551,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll index 9519a74265f..d96a4104d84 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll @@ -510,13 +510,20 @@ private predicate simpleParameterFlow( pragma[noinline] private predicate simpleArgumentFlowsThrough0( + ParameterNode p, ReturnNode ret, ReturnKind kind, DataFlowType t, Configuration config +) { + simpleParameterFlow(p, ret, t, config) and + kind = ret.getKind() +} + +pragma[noinline] +private predicate simpleArgumentFlowsThrough1( DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowType t, Configuration config ) { nodeCand1(arg, unbind(config)) and not outBarrier(arg, config) and exists(ParameterNode p, ReturnNode ret | - simpleParameterFlow(p, ret, t, config) and - kind = ret.getKind() and + simpleArgumentFlowsThrough0(p, ret, kind, t, config) and viableParamArg(call, p, arg) ) } @@ -534,7 +541,7 @@ private predicate simpleArgumentFlowsThrough( exists(DataFlowCall call, ReturnKind kind | nodeCand1(out, unbind(config)) and not inBarrier(out, config) and - simpleArgumentFlowsThrough0(call, arg, kind, t, config) and + simpleArgumentFlowsThrough1(call, arg, kind, t, config) and out = getAnOutNode(call, kind) ) } @@ -1529,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(node, f, toReturn, ap0, config) and + flowStore(ap0, f, node, toReturn, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(node, f, toReturn, ap0, config) and + flowRead(f, ap0, node, toReturn, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1551,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll index 9519a74265f..d96a4104d84 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll @@ -510,13 +510,20 @@ private predicate simpleParameterFlow( pragma[noinline] private predicate simpleArgumentFlowsThrough0( + ParameterNode p, ReturnNode ret, ReturnKind kind, DataFlowType t, Configuration config +) { + simpleParameterFlow(p, ret, t, config) and + kind = ret.getKind() +} + +pragma[noinline] +private predicate simpleArgumentFlowsThrough1( DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowType t, Configuration config ) { nodeCand1(arg, unbind(config)) and not outBarrier(arg, config) and exists(ParameterNode p, ReturnNode ret | - simpleParameterFlow(p, ret, t, config) and - kind = ret.getKind() and + simpleArgumentFlowsThrough0(p, ret, kind, t, config) and viableParamArg(call, p, arg) ) } @@ -534,7 +541,7 @@ private predicate simpleArgumentFlowsThrough( exists(DataFlowCall call, ReturnKind kind | nodeCand1(out, unbind(config)) and not inBarrier(out, config) and - simpleArgumentFlowsThrough0(call, arg, kind, t, config) and + simpleArgumentFlowsThrough1(call, arg, kind, t, config) and out = getAnOutNode(call, kind) ) } @@ -1529,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(node, f, toReturn, ap0, config) and + flowStore(ap0, f, node, toReturn, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(node, f, toReturn, ap0, config) and + flowRead(f, ap0, node, toReturn, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1551,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll index 9519a74265f..d96a4104d84 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll @@ -510,13 +510,20 @@ private predicate simpleParameterFlow( pragma[noinline] private predicate simpleArgumentFlowsThrough0( + ParameterNode p, ReturnNode ret, ReturnKind kind, DataFlowType t, Configuration config +) { + simpleParameterFlow(p, ret, t, config) and + kind = ret.getKind() +} + +pragma[noinline] +private predicate simpleArgumentFlowsThrough1( DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowType t, Configuration config ) { nodeCand1(arg, unbind(config)) and not outBarrier(arg, config) and exists(ParameterNode p, ReturnNode ret | - simpleParameterFlow(p, ret, t, config) and - kind = ret.getKind() and + simpleArgumentFlowsThrough0(p, ret, kind, t, config) and viableParamArg(call, p, arg) ) } @@ -534,7 +541,7 @@ private predicate simpleArgumentFlowsThrough( exists(DataFlowCall call, ReturnKind kind | nodeCand1(out, unbind(config)) and not inBarrier(out, config) and - simpleArgumentFlowsThrough0(call, arg, kind, t, config) and + simpleArgumentFlowsThrough1(call, arg, kind, t, config) and out = getAnOutNode(call, kind) ) } @@ -1529,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(node, f, toReturn, ap0, config) and + flowStore(ap0, f, node, toReturn, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(node, f, toReturn, ap0, config) and + flowRead(f, ap0, node, toReturn, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1551,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll index 9519a74265f..d96a4104d84 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll @@ -510,13 +510,20 @@ private predicate simpleParameterFlow( pragma[noinline] private predicate simpleArgumentFlowsThrough0( + ParameterNode p, ReturnNode ret, ReturnKind kind, DataFlowType t, Configuration config +) { + simpleParameterFlow(p, ret, t, config) and + kind = ret.getKind() +} + +pragma[noinline] +private predicate simpleArgumentFlowsThrough1( DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowType t, Configuration config ) { nodeCand1(arg, unbind(config)) and not outBarrier(arg, config) and exists(ParameterNode p, ReturnNode ret | - simpleParameterFlow(p, ret, t, config) and - kind = ret.getKind() and + simpleArgumentFlowsThrough0(p, ret, kind, t, config) and viableParamArg(call, p, arg) ) } @@ -534,7 +541,7 @@ private predicate simpleArgumentFlowsThrough( exists(DataFlowCall call, ReturnKind kind | nodeCand1(out, unbind(config)) and not inBarrier(out, config) and - simpleArgumentFlowsThrough0(call, arg, kind, t, config) and + simpleArgumentFlowsThrough1(call, arg, kind, t, config) and out = getAnOutNode(call, kind) ) } @@ -1529,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(node, f, toReturn, ap0, config) and + flowStore(ap0, f, node, toReturn, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(node, f, toReturn, ap0, config) and + flowRead(f, ap0, node, toReturn, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1551,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll index 9519a74265f..d96a4104d84 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll @@ -510,13 +510,20 @@ private predicate simpleParameterFlow( pragma[noinline] private predicate simpleArgumentFlowsThrough0( + ParameterNode p, ReturnNode ret, ReturnKind kind, DataFlowType t, Configuration config +) { + simpleParameterFlow(p, ret, t, config) and + kind = ret.getKind() +} + +pragma[noinline] +private predicate simpleArgumentFlowsThrough1( DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowType t, Configuration config ) { nodeCand1(arg, unbind(config)) and not outBarrier(arg, config) and exists(ParameterNode p, ReturnNode ret | - simpleParameterFlow(p, ret, t, config) and - kind = ret.getKind() and + simpleArgumentFlowsThrough0(p, ret, kind, t, config) and viableParamArg(call, p, arg) ) } @@ -534,7 +541,7 @@ private predicate simpleArgumentFlowsThrough( exists(DataFlowCall call, ReturnKind kind | nodeCand1(out, unbind(config)) and not inBarrier(out, config) and - simpleArgumentFlowsThrough0(call, arg, kind, t, config) and + simpleArgumentFlowsThrough1(call, arg, kind, t, config) and out = getAnOutNode(call, kind) ) } @@ -1529,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(node, f, toReturn, ap0, config) and + flowStore(ap0, f, node, toReturn, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(node, f, toReturn, ap0, config) and + flowRead(f, ap0, node, toReturn, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1551,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll index 9519a74265f..d96a4104d84 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll @@ -510,13 +510,20 @@ private predicate simpleParameterFlow( pragma[noinline] private predicate simpleArgumentFlowsThrough0( + ParameterNode p, ReturnNode ret, ReturnKind kind, DataFlowType t, Configuration config +) { + simpleParameterFlow(p, ret, t, config) and + kind = ret.getKind() +} + +pragma[noinline] +private predicate simpleArgumentFlowsThrough1( DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowType t, Configuration config ) { nodeCand1(arg, unbind(config)) and not outBarrier(arg, config) and exists(ParameterNode p, ReturnNode ret | - simpleParameterFlow(p, ret, t, config) and - kind = ret.getKind() and + simpleArgumentFlowsThrough0(p, ret, kind, t, config) and viableParamArg(call, p, arg) ) } @@ -534,7 +541,7 @@ private predicate simpleArgumentFlowsThrough( exists(DataFlowCall call, ReturnKind kind | nodeCand1(out, unbind(config)) and not inBarrier(out, config) and - simpleArgumentFlowsThrough0(call, arg, kind, t, config) and + simpleArgumentFlowsThrough1(call, arg, kind, t, config) and out = getAnOutNode(call, kind) ) } @@ -1529,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(node, f, toReturn, ap0, config) and + flowStore(ap0, f, node, toReturn, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(node, f, toReturn, ap0, config) and + flowRead(f, ap0, node, toReturn, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1551,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll index 9519a74265f..d96a4104d84 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll @@ -510,13 +510,20 @@ private predicate simpleParameterFlow( pragma[noinline] private predicate simpleArgumentFlowsThrough0( + ParameterNode p, ReturnNode ret, ReturnKind kind, DataFlowType t, Configuration config +) { + simpleParameterFlow(p, ret, t, config) and + kind = ret.getKind() +} + +pragma[noinline] +private predicate simpleArgumentFlowsThrough1( DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowType t, Configuration config ) { nodeCand1(arg, unbind(config)) and not outBarrier(arg, config) and exists(ParameterNode p, ReturnNode ret | - simpleParameterFlow(p, ret, t, config) and - kind = ret.getKind() and + simpleArgumentFlowsThrough0(p, ret, kind, t, config) and viableParamArg(call, p, arg) ) } @@ -534,7 +541,7 @@ private predicate simpleArgumentFlowsThrough( exists(DataFlowCall call, ReturnKind kind | nodeCand1(out, unbind(config)) and not inBarrier(out, config) and - simpleArgumentFlowsThrough0(call, arg, kind, t, config) and + simpleArgumentFlowsThrough1(call, arg, kind, t, config) and out = getAnOutNode(call, kind) ) } @@ -1529,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(node, f, toReturn, ap0, config) and + flowStore(ap0, f, node, toReturn, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(node, f, toReturn, ap0, config) and + flowRead(f, ap0, node, toReturn, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1551,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll index 9519a74265f..d96a4104d84 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll @@ -510,13 +510,20 @@ private predicate simpleParameterFlow( pragma[noinline] private predicate simpleArgumentFlowsThrough0( + ParameterNode p, ReturnNode ret, ReturnKind kind, DataFlowType t, Configuration config +) { + simpleParameterFlow(p, ret, t, config) and + kind = ret.getKind() +} + +pragma[noinline] +private predicate simpleArgumentFlowsThrough1( DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowType t, Configuration config ) { nodeCand1(arg, unbind(config)) and not outBarrier(arg, config) and exists(ParameterNode p, ReturnNode ret | - simpleParameterFlow(p, ret, t, config) and - kind = ret.getKind() and + simpleArgumentFlowsThrough0(p, ret, kind, t, config) and viableParamArg(call, p, arg) ) } @@ -534,7 +541,7 @@ private predicate simpleArgumentFlowsThrough( exists(DataFlowCall call, ReturnKind kind | nodeCand1(out, unbind(config)) and not inBarrier(out, config) and - simpleArgumentFlowsThrough0(call, arg, kind, t, config) and + simpleArgumentFlowsThrough1(call, arg, kind, t, config) and out = getAnOutNode(call, kind) ) } @@ -1529,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(node, f, toReturn, ap0, config) and + flowStore(ap0, f, node, toReturn, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(node, f, toReturn, ap0, config) and + flowRead(f, ap0, node, toReturn, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1551,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll index 9519a74265f..d96a4104d84 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll @@ -510,13 +510,20 @@ private predicate simpleParameterFlow( pragma[noinline] private predicate simpleArgumentFlowsThrough0( + ParameterNode p, ReturnNode ret, ReturnKind kind, DataFlowType t, Configuration config +) { + simpleParameterFlow(p, ret, t, config) and + kind = ret.getKind() +} + +pragma[noinline] +private predicate simpleArgumentFlowsThrough1( DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowType t, Configuration config ) { nodeCand1(arg, unbind(config)) and not outBarrier(arg, config) and exists(ParameterNode p, ReturnNode ret | - simpleParameterFlow(p, ret, t, config) and - kind = ret.getKind() and + simpleArgumentFlowsThrough0(p, ret, kind, t, config) and viableParamArg(call, p, arg) ) } @@ -534,7 +541,7 @@ private predicate simpleArgumentFlowsThrough( exists(DataFlowCall call, ReturnKind kind | nodeCand1(out, unbind(config)) and not inBarrier(out, config) and - simpleArgumentFlowsThrough0(call, arg, kind, t, config) and + simpleArgumentFlowsThrough1(call, arg, kind, t, config) and out = getAnOutNode(call, kind) ) } @@ -1529,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(node, f, toReturn, ap0, config) and + flowStore(ap0, f, node, toReturn, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(node, f, toReturn, ap0, config) and + flowRead(f, ap0, node, toReturn, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1551,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll index 9519a74265f..d96a4104d84 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll @@ -510,13 +510,20 @@ private predicate simpleParameterFlow( pragma[noinline] private predicate simpleArgumentFlowsThrough0( + ParameterNode p, ReturnNode ret, ReturnKind kind, DataFlowType t, Configuration config +) { + simpleParameterFlow(p, ret, t, config) and + kind = ret.getKind() +} + +pragma[noinline] +private predicate simpleArgumentFlowsThrough1( DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowType t, Configuration config ) { nodeCand1(arg, unbind(config)) and not outBarrier(arg, config) and exists(ParameterNode p, ReturnNode ret | - simpleParameterFlow(p, ret, t, config) and - kind = ret.getKind() and + simpleArgumentFlowsThrough0(p, ret, kind, t, config) and viableParamArg(call, p, arg) ) } @@ -534,7 +541,7 @@ private predicate simpleArgumentFlowsThrough( exists(DataFlowCall call, ReturnKind kind | nodeCand1(out, unbind(config)) and not inBarrier(out, config) and - simpleArgumentFlowsThrough0(call, arg, kind, t, config) and + simpleArgumentFlowsThrough1(call, arg, kind, t, config) and out = getAnOutNode(call, kind) ) } @@ -1529,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(node, f, toReturn, ap0, config) and + flowStore(ap0, f, node, toReturn, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(node, f, toReturn, ap0, config) and + flowRead(f, ap0, node, toReturn, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1551,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll index 9519a74265f..d96a4104d84 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll @@ -510,13 +510,20 @@ private predicate simpleParameterFlow( pragma[noinline] private predicate simpleArgumentFlowsThrough0( + ParameterNode p, ReturnNode ret, ReturnKind kind, DataFlowType t, Configuration config +) { + simpleParameterFlow(p, ret, t, config) and + kind = ret.getKind() +} + +pragma[noinline] +private predicate simpleArgumentFlowsThrough1( DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowType t, Configuration config ) { nodeCand1(arg, unbind(config)) and not outBarrier(arg, config) and exists(ParameterNode p, ReturnNode ret | - simpleParameterFlow(p, ret, t, config) and - kind = ret.getKind() and + simpleArgumentFlowsThrough0(p, ret, kind, t, config) and viableParamArg(call, p, arg) ) } @@ -534,7 +541,7 @@ private predicate simpleArgumentFlowsThrough( exists(DataFlowCall call, ReturnKind kind | nodeCand1(out, unbind(config)) and not inBarrier(out, config) and - simpleArgumentFlowsThrough0(call, arg, kind, t, config) and + simpleArgumentFlowsThrough1(call, arg, kind, t, config) and out = getAnOutNode(call, kind) ) } @@ -1529,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(node, f, toReturn, ap0, config) and + flowStore(ap0, f, node, toReturn, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(node, f, toReturn, ap0, config) and + flowRead(f, ap0, node, toReturn, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1551,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config + Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config ) { exists(Node mid | read(node, f, mid) and From b3990c5a1d40b35ef220a2d0b27e60f7c03545d4 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Mon, 2 Dec 2019 14:25:59 +0100 Subject: [PATCH 3/3] Data flow: Revert reordering changes in `flowStore` and `flowRead` --- .../semmle/code/cpp/dataflow/internal/DataFlowImpl.qll | 8 ++++---- .../semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll | 8 ++++---- .../semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll | 8 ++++---- .../semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll | 8 ++++---- .../code/cpp/dataflow/internal/DataFlowImplLocal.qll | 8 ++++---- .../semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll | 8 ++++---- .../code/cpp/ir/dataflow/internal/DataFlowImpl2.qll | 8 ++++---- .../code/cpp/ir/dataflow/internal/DataFlowImpl3.qll | 8 ++++---- .../code/cpp/ir/dataflow/internal/DataFlowImpl4.qll | 8 ++++---- .../semmle/code/csharp/dataflow/internal/DataFlowImpl.qll | 8 ++++---- .../code/csharp/dataflow/internal/DataFlowImpl2.qll | 8 ++++---- .../code/csharp/dataflow/internal/DataFlowImpl3.qll | 8 ++++---- .../code/csharp/dataflow/internal/DataFlowImpl4.qll | 8 ++++---- .../code/csharp/dataflow/internal/DataFlowImpl5.qll | 8 ++++---- .../semmle/code/java/dataflow/internal/DataFlowImpl.qll | 8 ++++---- .../semmle/code/java/dataflow/internal/DataFlowImpl2.qll | 8 ++++---- .../semmle/code/java/dataflow/internal/DataFlowImpl3.qll | 8 ++++---- .../semmle/code/java/dataflow/internal/DataFlowImpl4.qll | 8 ++++---- .../semmle/code/java/dataflow/internal/DataFlowImpl5.qll | 8 ++++---- 19 files changed, 76 insertions(+), 76 deletions(-) diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll index d96a4104d84..1f322a02201 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll @@ -1536,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(ap0, f, node, toReturn, config) and + flowStore(node, f, toReturn, ap0, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(f, ap0, node, toReturn, config) and + flowRead(node, f, toReturn, ap0, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1558,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll index d96a4104d84..1f322a02201 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll @@ -1536,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(ap0, f, node, toReturn, config) and + flowStore(node, f, toReturn, ap0, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(f, ap0, node, toReturn, config) and + flowRead(node, f, toReturn, ap0, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1558,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll index d96a4104d84..1f322a02201 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll @@ -1536,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(ap0, f, node, toReturn, config) and + flowStore(node, f, toReturn, ap0, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(f, ap0, node, toReturn, config) and + flowRead(node, f, toReturn, ap0, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1558,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll index d96a4104d84..1f322a02201 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll @@ -1536,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(ap0, f, node, toReturn, config) and + flowStore(node, f, toReturn, ap0, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(f, ap0, node, toReturn, config) and + flowRead(node, f, toReturn, ap0, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1558,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll index d96a4104d84..1f322a02201 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll @@ -1536,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(ap0, f, node, toReturn, config) and + flowStore(node, f, toReturn, ap0, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(f, ap0, node, toReturn, config) and + flowRead(node, f, toReturn, ap0, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1558,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll index d96a4104d84..1f322a02201 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll @@ -1536,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(ap0, f, node, toReturn, config) and + flowStore(node, f, toReturn, ap0, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(f, ap0, node, toReturn, config) and + flowRead(node, f, toReturn, ap0, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1558,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll index d96a4104d84..1f322a02201 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll @@ -1536,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(ap0, f, node, toReturn, config) and + flowStore(node, f, toReturn, ap0, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(f, ap0, node, toReturn, config) and + flowRead(node, f, toReturn, ap0, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1558,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll index d96a4104d84..1f322a02201 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll @@ -1536,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(ap0, f, node, toReturn, config) and + flowStore(node, f, toReturn, ap0, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(f, ap0, node, toReturn, config) and + flowRead(node, f, toReturn, ap0, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1558,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll index d96a4104d84..1f322a02201 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll @@ -1536,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(ap0, f, node, toReturn, config) and + flowStore(node, f, toReturn, ap0, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(f, ap0, node, toReturn, config) and + flowRead(node, f, toReturn, ap0, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1558,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll index d96a4104d84..1f322a02201 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll @@ -1536,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(ap0, f, node, toReturn, config) and + flowStore(node, f, toReturn, ap0, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(f, ap0, node, toReturn, config) and + flowRead(node, f, toReturn, ap0, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1558,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll index d96a4104d84..1f322a02201 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll @@ -1536,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(ap0, f, node, toReturn, config) and + flowStore(node, f, toReturn, ap0, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(f, ap0, node, toReturn, config) and + flowRead(node, f, toReturn, ap0, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1558,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll index d96a4104d84..1f322a02201 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll @@ -1536,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(ap0, f, node, toReturn, config) and + flowStore(node, f, toReturn, ap0, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(f, ap0, node, toReturn, config) and + flowRead(node, f, toReturn, ap0, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1558,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll index d96a4104d84..1f322a02201 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll @@ -1536,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(ap0, f, node, toReturn, config) and + flowStore(node, f, toReturn, ap0, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(f, ap0, node, toReturn, config) and + flowRead(node, f, toReturn, ap0, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1558,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll index d96a4104d84..1f322a02201 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll @@ -1536,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(ap0, f, node, toReturn, config) and + flowStore(node, f, toReturn, ap0, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(f, ap0, node, toReturn, config) and + flowRead(node, f, toReturn, ap0, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1558,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll index d96a4104d84..1f322a02201 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll @@ -1536,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(ap0, f, node, toReturn, config) and + flowStore(node, f, toReturn, ap0, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(f, ap0, node, toReturn, config) and + flowRead(node, f, toReturn, ap0, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1558,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll index d96a4104d84..1f322a02201 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll @@ -1536,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(ap0, f, node, toReturn, config) and + flowStore(node, f, toReturn, ap0, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(f, ap0, node, toReturn, config) and + flowRead(node, f, toReturn, ap0, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1558,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll index d96a4104d84..1f322a02201 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll @@ -1536,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(ap0, f, node, toReturn, config) and + flowStore(node, f, toReturn, ap0, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(f, ap0, node, toReturn, config) and + flowRead(node, f, toReturn, ap0, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1558,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll index d96a4104d84..1f322a02201 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll @@ -1536,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(ap0, f, node, toReturn, config) and + flowStore(node, f, toReturn, ap0, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(f, ap0, node, toReturn, config) and + flowRead(node, f, toReturn, ap0, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1558,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | read(node, f, mid) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll index d96a4104d84..1f322a02201 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll @@ -1536,19 +1536,19 @@ private predicate flow0(Node node, boolean toReturn, AccessPath ap, Configuratio ) or exists(Content f, AccessPath ap0 | - flowStore(ap0, f, node, toReturn, config) and + flowStore(node, f, toReturn, ap0, config) and pop(ap0, f, ap) ) or exists(Content f, AccessPath ap0 | - flowRead(f, ap0, node, toReturn, config) and + flowRead(node, f, toReturn, ap0, config) and push(ap0, f, ap) ) } pragma[nomagic] private predicate flowStore( - AccessPath ap0, Content f, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | store(node, f, mid) and @@ -1558,7 +1558,7 @@ private predicate flowStore( pragma[nomagic] private predicate flowRead( - Content f, AccessPath ap0, Node node, boolean toReturn, Configuration config + Node node, Content f, boolean toReturn, AccessPath ap0, Configuration config ) { exists(Node mid | read(node, f, mid) and