Skip to content

Commit f979582

Browse files
committed
Java/C++/C#: Sync.
1 parent 4221639 commit f979582

File tree

21 files changed

+2006
-1343
lines changed

21 files changed

+2006
-1343
lines changed

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* on each other without introducing mutual recursion among those configurations.
88
*/
99

10-
private import DataFlowImplCommon
10+
private import DataFlowImplCommon::Public
1111
private import DataFlowImplSpecific::Private
1212
import DataFlowImplSpecific::Public
1313

@@ -1075,6 +1075,7 @@ private predicate flowCandFwd0(Node node, boolean fromArg, AccessPathFront apf,
10751075
flowCandFwd(mid, fromArg, _, config) and
10761076
store(mid, f, node) and
10771077
nodeCand(node, unbind(config)) and
1078+
readStoreCand(f, unbind(config)) and
10781079
apf.headUsesContent(f)
10791080
)
10801081
or
@@ -1175,12 +1176,12 @@ private predicate flowCand0(Node node, boolean toReturn, AccessPathFront apf, Co
11751176
exists(Content f, AccessPathFront apf0 |
11761177
flowCandStore(node, f, toReturn, apf0, config) and
11771178
apf0.headUsesContent(f) and
1178-
consCand(f, apf, unbind(config))
1179+
consCand(f, apf, config)
11791180
)
11801181
or
11811182
exists(Content f, AccessPathFront apf0 |
11821183
flowCandRead(node, f, toReturn, apf0, config) and
1183-
consCandFwd(f, apf0, unbind(config)) and
1184+
consCandFwd(f, apf0, config) and
11841185
apf.headUsesContent(f)
11851186
)
11861187
}
@@ -1221,8 +1222,8 @@ private newtype TAccessPath =
12211222
TConsCons(Content f1, Content f2, int len) { consCand(f1, TFrontHead(f2), _) and len in [2 .. 5] }
12221223

12231224
/**
1224-
* Conceptually a list of `Content`s followed by a `Type`, but only the first
1225-
* element of the list and its length are tracked. If data flows from a source to
1225+
* Conceptually a list of `Content`s followed by a `Type`, but only the first two
1226+
* elements of the list and its length are tracked. If data flows from a source to
12261227
* a given node with a given `AccessPath`, this indicates the sequence of
12271228
* dereference operations needed to get from the value in the node to the
12281229
* tracked object. The final type indicates the type of the tracked object.

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* on each other without introducing mutual recursion among those configurations.
88
*/
99

10-
private import DataFlowImplCommon
10+
private import DataFlowImplCommon::Public
1111
private import DataFlowImplSpecific::Private
1212
import DataFlowImplSpecific::Public
1313

@@ -1075,6 +1075,7 @@ private predicate flowCandFwd0(Node node, boolean fromArg, AccessPathFront apf,
10751075
flowCandFwd(mid, fromArg, _, config) and
10761076
store(mid, f, node) and
10771077
nodeCand(node, unbind(config)) and
1078+
readStoreCand(f, unbind(config)) and
10781079
apf.headUsesContent(f)
10791080
)
10801081
or
@@ -1175,12 +1176,12 @@ private predicate flowCand0(Node node, boolean toReturn, AccessPathFront apf, Co
11751176
exists(Content f, AccessPathFront apf0 |
11761177
flowCandStore(node, f, toReturn, apf0, config) and
11771178
apf0.headUsesContent(f) and
1178-
consCand(f, apf, unbind(config))
1179+
consCand(f, apf, config)
11791180
)
11801181
or
11811182
exists(Content f, AccessPathFront apf0 |
11821183
flowCandRead(node, f, toReturn, apf0, config) and
1183-
consCandFwd(f, apf0, unbind(config)) and
1184+
consCandFwd(f, apf0, config) and
11841185
apf.headUsesContent(f)
11851186
)
11861187
}
@@ -1221,8 +1222,8 @@ private newtype TAccessPath =
12211222
TConsCons(Content f1, Content f2, int len) { consCand(f1, TFrontHead(f2), _) and len in [2 .. 5] }
12221223

12231224
/**
1224-
* Conceptually a list of `Content`s followed by a `Type`, but only the first
1225-
* element of the list and its length are tracked. If data flows from a source to
1225+
* Conceptually a list of `Content`s followed by a `Type`, but only the first two
1226+
* elements of the list and its length are tracked. If data flows from a source to
12261227
* a given node with a given `AccessPath`, this indicates the sequence of
12271228
* dereference operations needed to get from the value in the node to the
12281229
* tracked object. The final type indicates the type of the tracked object.

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* on each other without introducing mutual recursion among those configurations.
88
*/
99

10-
private import DataFlowImplCommon
10+
private import DataFlowImplCommon::Public
1111
private import DataFlowImplSpecific::Private
1212
import DataFlowImplSpecific::Public
1313

@@ -1075,6 +1075,7 @@ private predicate flowCandFwd0(Node node, boolean fromArg, AccessPathFront apf,
10751075
flowCandFwd(mid, fromArg, _, config) and
10761076
store(mid, f, node) and
10771077
nodeCand(node, unbind(config)) and
1078+
readStoreCand(f, unbind(config)) and
10781079
apf.headUsesContent(f)
10791080
)
10801081
or
@@ -1175,12 +1176,12 @@ private predicate flowCand0(Node node, boolean toReturn, AccessPathFront apf, Co
11751176
exists(Content f, AccessPathFront apf0 |
11761177
flowCandStore(node, f, toReturn, apf0, config) and
11771178
apf0.headUsesContent(f) and
1178-
consCand(f, apf, unbind(config))
1179+
consCand(f, apf, config)
11791180
)
11801181
or
11811182
exists(Content f, AccessPathFront apf0 |
11821183
flowCandRead(node, f, toReturn, apf0, config) and
1183-
consCandFwd(f, apf0, unbind(config)) and
1184+
consCandFwd(f, apf0, config) and
11841185
apf.headUsesContent(f)
11851186
)
11861187
}
@@ -1221,8 +1222,8 @@ private newtype TAccessPath =
12211222
TConsCons(Content f1, Content f2, int len) { consCand(f1, TFrontHead(f2), _) and len in [2 .. 5] }
12221223

12231224
/**
1224-
* Conceptually a list of `Content`s followed by a `Type`, but only the first
1225-
* element of the list and its length are tracked. If data flows from a source to
1225+
* Conceptually a list of `Content`s followed by a `Type`, but only the first two
1226+
* elements of the list and its length are tracked. If data flows from a source to
12261227
* a given node with a given `AccessPath`, this indicates the sequence of
12271228
* dereference operations needed to get from the value in the node to the
12281229
* tracked object. The final type indicates the type of the tracked object.

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* on each other without introducing mutual recursion among those configurations.
88
*/
99

10-
private import DataFlowImplCommon
10+
private import DataFlowImplCommon::Public
1111
private import DataFlowImplSpecific::Private
1212
import DataFlowImplSpecific::Public
1313

@@ -1075,6 +1075,7 @@ private predicate flowCandFwd0(Node node, boolean fromArg, AccessPathFront apf,
10751075
flowCandFwd(mid, fromArg, _, config) and
10761076
store(mid, f, node) and
10771077
nodeCand(node, unbind(config)) and
1078+
readStoreCand(f, unbind(config)) and
10781079
apf.headUsesContent(f)
10791080
)
10801081
or
@@ -1175,12 +1176,12 @@ private predicate flowCand0(Node node, boolean toReturn, AccessPathFront apf, Co
11751176
exists(Content f, AccessPathFront apf0 |
11761177
flowCandStore(node, f, toReturn, apf0, config) and
11771178
apf0.headUsesContent(f) and
1178-
consCand(f, apf, unbind(config))
1179+
consCand(f, apf, config)
11791180
)
11801181
or
11811182
exists(Content f, AccessPathFront apf0 |
11821183
flowCandRead(node, f, toReturn, apf0, config) and
1183-
consCandFwd(f, apf0, unbind(config)) and
1184+
consCandFwd(f, apf0, config) and
11841185
apf.headUsesContent(f)
11851186
)
11861187
}
@@ -1221,8 +1222,8 @@ private newtype TAccessPath =
12211222
TConsCons(Content f1, Content f2, int len) { consCand(f1, TFrontHead(f2), _) and len in [2 .. 5] }
12221223

12231224
/**
1224-
* Conceptually a list of `Content`s followed by a `Type`, but only the first
1225-
* element of the list and its length are tracked. If data flows from a source to
1225+
* Conceptually a list of `Content`s followed by a `Type`, but only the first two
1226+
* elements of the list and its length are tracked. If data flows from a source to
12261227
* a given node with a given `AccessPath`, this indicates the sequence of
12271228
* dereference operations needed to get from the value in the node to the
12281229
* tracked object. The final type indicates the type of the tracked object.

0 commit comments

Comments
 (0)