Skip to content

Commit 91927c9

Browse files
committed
Merge remote-tracking branch 'upstream/master' into ir-crement-load
Conflicts: cpp/ql/test/library-tests/ir/ssa/aliased_ssa_ir.expected cpp/ql/test/library-tests/ir/ssa/aliased_ssa_ir_unsound.expected cpp/ql/test/library-tests/ir/ssa/unaliased_ssa_ir.expected cpp/ql/test/library-tests/ir/ssa/unaliased_ssa_ir_unsound.expected
2 parents cdfcee3 + c0417ac commit 91927c9

File tree

63 files changed

+5026
-3679
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+5026
-3679
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,12 +2041,12 @@ private class PathNodeMid extends PathNode, TPathNodeMid {
20412041
result = getSuccMid()
20422042
or
20432043
// a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges
2044-
exists(PathNodeMid mid |
2044+
exists(PathNodeMid mid, PathNodeSink sink |
20452045
mid = getSuccMid() and
2046-
mid.getNode() = result.getNode() and
2046+
mid.getNode() = sink.getNode() and
20472047
mid.getAp() instanceof AccessPathNil and
2048-
result instanceof PathNodeSink and
2049-
result.getConfiguration() = unbind(mid.getConfiguration())
2048+
sink.getConfiguration() = unbind(mid.getConfiguration()) and
2049+
result = sink
20502050
)
20512051
}
20522052

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,12 +2041,12 @@ private class PathNodeMid extends PathNode, TPathNodeMid {
20412041
result = getSuccMid()
20422042
or
20432043
// a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges
2044-
exists(PathNodeMid mid |
2044+
exists(PathNodeMid mid, PathNodeSink sink |
20452045
mid = getSuccMid() and
2046-
mid.getNode() = result.getNode() and
2046+
mid.getNode() = sink.getNode() and
20472047
mid.getAp() instanceof AccessPathNil and
2048-
result instanceof PathNodeSink and
2049-
result.getConfiguration() = unbind(mid.getConfiguration())
2048+
sink.getConfiguration() = unbind(mid.getConfiguration()) and
2049+
result = sink
20502050
)
20512051
}
20522052

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,12 +2041,12 @@ private class PathNodeMid extends PathNode, TPathNodeMid {
20412041
result = getSuccMid()
20422042
or
20432043
// a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges
2044-
exists(PathNodeMid mid |
2044+
exists(PathNodeMid mid, PathNodeSink sink |
20452045
mid = getSuccMid() and
2046-
mid.getNode() = result.getNode() and
2046+
mid.getNode() = sink.getNode() and
20472047
mid.getAp() instanceof AccessPathNil and
2048-
result instanceof PathNodeSink and
2049-
result.getConfiguration() = unbind(mid.getConfiguration())
2048+
sink.getConfiguration() = unbind(mid.getConfiguration()) and
2049+
result = sink
20502050
)
20512051
}
20522052

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,12 +2041,12 @@ private class PathNodeMid extends PathNode, TPathNodeMid {
20412041
result = getSuccMid()
20422042
or
20432043
// a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges
2044-
exists(PathNodeMid mid |
2044+
exists(PathNodeMid mid, PathNodeSink sink |
20452045
mid = getSuccMid() and
2046-
mid.getNode() = result.getNode() and
2046+
mid.getNode() = sink.getNode() and
20472047
mid.getAp() instanceof AccessPathNil and
2048-
result instanceof PathNodeSink and
2049-
result.getConfiguration() = unbind(mid.getConfiguration())
2048+
sink.getConfiguration() = unbind(mid.getConfiguration()) and
2049+
result = sink
20502050
)
20512051
}
20522052

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,12 +2041,12 @@ private class PathNodeMid extends PathNode, TPathNodeMid {
20412041
result = getSuccMid()
20422042
or
20432043
// a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges
2044-
exists(PathNodeMid mid |
2044+
exists(PathNodeMid mid, PathNodeSink sink |
20452045
mid = getSuccMid() and
2046-
mid.getNode() = result.getNode() and
2046+
mid.getNode() = sink.getNode() and
20472047
mid.getAp() instanceof AccessPathNil and
2048-
result instanceof PathNodeSink and
2049-
result.getConfiguration() = unbind(mid.getConfiguration())
2048+
sink.getConfiguration() = unbind(mid.getConfiguration()) and
2049+
result = sink
20502050
)
20512051
}
20522052

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,12 +2041,12 @@ private class PathNodeMid extends PathNode, TPathNodeMid {
20412041
result = getSuccMid()
20422042
or
20432043
// a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges
2044-
exists(PathNodeMid mid |
2044+
exists(PathNodeMid mid, PathNodeSink sink |
20452045
mid = getSuccMid() and
2046-
mid.getNode() = result.getNode() and
2046+
mid.getNode() = sink.getNode() and
20472047
mid.getAp() instanceof AccessPathNil and
2048-
result instanceof PathNodeSink and
2049-
result.getConfiguration() = unbind(mid.getConfiguration())
2048+
sink.getConfiguration() = unbind(mid.getConfiguration()) and
2049+
result = sink
20502050
)
20512051
}
20522052

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,12 +2041,12 @@ private class PathNodeMid extends PathNode, TPathNodeMid {
20412041
result = getSuccMid()
20422042
or
20432043
// a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges
2044-
exists(PathNodeMid mid |
2044+
exists(PathNodeMid mid, PathNodeSink sink |
20452045
mid = getSuccMid() and
2046-
mid.getNode() = result.getNode() and
2046+
mid.getNode() = sink.getNode() and
20472047
mid.getAp() instanceof AccessPathNil and
2048-
result instanceof PathNodeSink and
2049-
result.getConfiguration() = unbind(mid.getConfiguration())
2048+
sink.getConfiguration() = unbind(mid.getConfiguration()) and
2049+
result = sink
20502050
)
20512051
}
20522052

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,12 +2041,12 @@ private class PathNodeMid extends PathNode, TPathNodeMid {
20412041
result = getSuccMid()
20422042
or
20432043
// a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges
2044-
exists(PathNodeMid mid |
2044+
exists(PathNodeMid mid, PathNodeSink sink |
20452045
mid = getSuccMid() and
2046-
mid.getNode() = result.getNode() and
2046+
mid.getNode() = sink.getNode() and
20472047
mid.getAp() instanceof AccessPathNil and
2048-
result instanceof PathNodeSink and
2049-
result.getConfiguration() = unbind(mid.getConfiguration())
2048+
sink.getConfiguration() = unbind(mid.getConfiguration()) and
2049+
result = sink
20502050
)
20512051
}
20522052

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,12 +2041,12 @@ private class PathNodeMid extends PathNode, TPathNodeMid {
20412041
result = getSuccMid()
20422042
or
20432043
// a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges
2044-
exists(PathNodeMid mid |
2044+
exists(PathNodeMid mid, PathNodeSink sink |
20452045
mid = getSuccMid() and
2046-
mid.getNode() = result.getNode() and
2046+
mid.getNode() = sink.getNode() and
20472047
mid.getAp() instanceof AccessPathNil and
2048-
result instanceof PathNodeSink and
2049-
result.getConfiguration() = unbind(mid.getConfiguration())
2048+
sink.getConfiguration() = unbind(mid.getConfiguration()) and
2049+
result = sink
20502050
)
20512051
}
20522052

cpp/ql/src/semmle/code/cpp/ir/implementation/Opcode.qll

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ private newtype TOpcode =
6363
TUnmodeledDefinition() or
6464
TUnmodeledUse() or
6565
TAliasedDefinition() or
66+
TInitializeNonLocal() or
6667
TAliasedUse() or
6768
TPhi() or
6869
TBuiltIn() or
@@ -596,6 +597,14 @@ module Opcode {
596597
final override MemoryAccessKind getWriteMemoryAccess() { result instanceof EscapedMemoryAccess }
597598
}
598599

600+
class InitializeNonLocal extends Opcode, TInitializeNonLocal {
601+
final override string toString() { result = "InitializeNonLocal" }
602+
603+
final override MemoryAccessKind getWriteMemoryAccess() {
604+
result instanceof NonLocalMemoryAccess
605+
}
606+
}
607+
599608
class AliasedUse extends Opcode, TAliasedUse {
600609
final override string toString() { result = "AliasedUse" }
601610

0 commit comments

Comments
 (0)