Skip to content

Commit 0dd99f6

Browse files
committed
Address review comments
1 parent d0260fe commit 0dd99f6

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

rust/ql/lib/codeql/rust/dataflow/internal/DataFlowConsistency.qll

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ private module Input implements InputSig<Location, RustDataFlow> {
1919
predicate postWithInFlowExclude(RustDataFlow::Node n) {
2020
n instanceof Node::FlowSummaryNode
2121
or
22-
// We allow flow into post-update node for receiver expressions (from the
23-
// synthetic post receiever node).
24-
n.(Node::PostUpdateNode).getPreUpdateNode().asExpr() = any(Node::DerefBorrowNode r).getNode()
25-
or
2622
n.(Node::PostUpdateNode).getPreUpdateNode().asExpr() = getPostUpdateReverseStep(_, _)
2723
or
2824
FlowSummaryImpl::Private::Steps::sourceLocalStep(_, n, _)

rust/ql/lib/codeql/rust/frameworks/stdlib/core.model.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@ extensions:
2929
- ["<_ as core::iter::traits::iterator::Iterator>::chain", "Argument[0]", "ReturnValue", "taint", "manual"]
3030
- ["<_ as core::iter::traits::iterator::Iterator>::take", "Argument[self]", "ReturnValue", "taint", "manual"]
3131
# Pin
32-
- ["core::pin::Pin", "Argument[0]", "ReturnValue", "value", "manual"]
33-
- ["<core::pin::Pin>::new", "Argument[0]", "ReturnValue", "value", "manual"]
32+
- ["<core::pin::Pin>::new", "Argument[0]", "ReturnValue.Field[core::pin::Pin::pointer]", "value", "manual"]
3433
- ["<core::pin::Pin>::new_unchecked", "Argument[0]", "ReturnValue.Field[core::pin::Pin::pointer]", "value", "manual"]
35-
- ["<core::pin::Pin>::into_inner", "Argument[0]", "ReturnValue", "value", "manual"]
34+
- ["<core::pin::Pin>::into_inner", "Argument[0].Field[core::pin::Pin::pointer]", "ReturnValue", "value", "manual"]
3635
- ["<core::pin::Pin>::into_inner_unchecked", "Argument[0].Field[core::pin::Pin::pointer]", "ReturnValue", "value", "manual"]
37-
- ["<core::pin::Pin>::set", "Argument[0]", "Argument[self]", "value", "manual"]
36+
- ["<core::pin::Pin>::set", "Argument[0]", "Argument[self].Reference.Field[core::pin::Pin::pointer]", "value", "manual"]
3837
# Ptr
3938
- ["core::ptr::read", "Argument[0].Reference", "ReturnValue", "value", "manual"]
4039
- ["core::ptr::read_unaligned", "Argument[0].Reference", "ReturnValue", "value", "manual"]

0 commit comments

Comments
 (0)