From f2760f2547e87588716384671589b3c6c38b6aca Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Fri, 24 Aug 2018 10:29:50 +0200 Subject: [PATCH] Java/C: Improve performance when multiple configs use field flow. --- .../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 ++++---- 4 files changed, 16 insertions(+), 16 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 142ea7f8a7e9..fcd0e19126b9 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll @@ -237,7 +237,7 @@ private predicate storeCandFwd1(Content f, Configuration config) { exists(Node mid, Node node | not config.isBarrier(node) and - useFieldFlow(unbind(config)) and + useFieldFlow(config) and nodeCandFwd1(mid, _, config) and store(mid, f, node) ) @@ -312,7 +312,7 @@ */ private predicate readCand1(Content f, Configuration config) { exists(Node mid, Node node | - useFieldFlow(unbind(config)) and + useFieldFlow(config) and nodeCandFwd1(node, true, unbind(config)) and read(node, f, mid) and storeCandFwd1(f, unbind(config)) and @@ -548,7 +548,7 @@ */ private predicate storeCandFwd2(Content f, Configuration config) { exists(Node mid, Node node | - useFieldFlow(unbind(config)) and + useFieldFlow(config) and nodeCand1(node, true, unbind(config)) and nodeCandFwd2(mid, _, _, config) and store(mid, f, node) and @@ -616,7 +616,7 @@ */ private predicate readCand2(Content f, Configuration config) { exists(Node mid, Node node | - useFieldFlow(unbind(config)) and + useFieldFlow(config) and nodeCandFwd2(node, _, true, unbind(config)) and read(node, f, mid) and storeCandFwd2(f, unbind(config)) 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 142ea7f8a7e9..fcd0e19126b9 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll @@ -237,7 +237,7 @@ private predicate storeCandFwd1(Content f, Configuration config) { exists(Node mid, Node node | not config.isBarrier(node) and - useFieldFlow(unbind(config)) and + useFieldFlow(config) and nodeCandFwd1(mid, _, config) and store(mid, f, node) ) @@ -312,7 +312,7 @@ */ private predicate readCand1(Content f, Configuration config) { exists(Node mid, Node node | - useFieldFlow(unbind(config)) and + useFieldFlow(config) and nodeCandFwd1(node, true, unbind(config)) and read(node, f, mid) and storeCandFwd1(f, unbind(config)) and @@ -548,7 +548,7 @@ */ private predicate storeCandFwd2(Content f, Configuration config) { exists(Node mid, Node node | - useFieldFlow(unbind(config)) and + useFieldFlow(config) and nodeCand1(node, true, unbind(config)) and nodeCandFwd2(mid, _, _, config) and store(mid, f, node) and @@ -616,7 +616,7 @@ */ private predicate readCand2(Content f, Configuration config) { exists(Node mid, Node node | - useFieldFlow(unbind(config)) and + useFieldFlow(config) and nodeCandFwd2(node, _, true, unbind(config)) and read(node, f, mid) and storeCandFwd2(f, unbind(config)) 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 142ea7f8a7e9..fcd0e19126b9 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll @@ -237,7 +237,7 @@ private predicate storeCandFwd1(Content f, Configuration config) { exists(Node mid, Node node | not config.isBarrier(node) and - useFieldFlow(unbind(config)) and + useFieldFlow(config) and nodeCandFwd1(mid, _, config) and store(mid, f, node) ) @@ -312,7 +312,7 @@ */ private predicate readCand1(Content f, Configuration config) { exists(Node mid, Node node | - useFieldFlow(unbind(config)) and + useFieldFlow(config) and nodeCandFwd1(node, true, unbind(config)) and read(node, f, mid) and storeCandFwd1(f, unbind(config)) and @@ -548,7 +548,7 @@ */ private predicate storeCandFwd2(Content f, Configuration config) { exists(Node mid, Node node | - useFieldFlow(unbind(config)) and + useFieldFlow(config) and nodeCand1(node, true, unbind(config)) and nodeCandFwd2(mid, _, _, config) and store(mid, f, node) and @@ -616,7 +616,7 @@ */ private predicate readCand2(Content f, Configuration config) { exists(Node mid, Node node | - useFieldFlow(unbind(config)) and + useFieldFlow(config) and nodeCandFwd2(node, _, true, unbind(config)) and read(node, f, mid) and storeCandFwd2(f, unbind(config)) 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 142ea7f8a7e9..fcd0e19126b9 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll @@ -237,7 +237,7 @@ private predicate storeCandFwd1(Content f, Configuration config) { exists(Node mid, Node node | not config.isBarrier(node) and - useFieldFlow(unbind(config)) and + useFieldFlow(config) and nodeCandFwd1(mid, _, config) and store(mid, f, node) ) @@ -312,7 +312,7 @@ */ private predicate readCand1(Content f, Configuration config) { exists(Node mid, Node node | - useFieldFlow(unbind(config)) and + useFieldFlow(config) and nodeCandFwd1(node, true, unbind(config)) and read(node, f, mid) and storeCandFwd1(f, unbind(config)) and @@ -548,7 +548,7 @@ */ private predicate storeCandFwd2(Content f, Configuration config) { exists(Node mid, Node node | - useFieldFlow(unbind(config)) and + useFieldFlow(config) and nodeCand1(node, true, unbind(config)) and nodeCandFwd2(mid, _, _, config) and store(mid, f, node) and @@ -616,7 +616,7 @@ */ private predicate readCand2(Content f, Configuration config) { exists(Node mid, Node node | - useFieldFlow(unbind(config)) and + useFieldFlow(config) and nodeCandFwd2(node, _, true, unbind(config)) and read(node, f, mid) and storeCandFwd2(f, unbind(config)) and