Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7a72c5459dd58f81b0e1a0e5436d145485889375
69d4d5fc0e4db60272aac85ef27ecccef5764f3a
15 changes: 0 additions & 15 deletions src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,21 +351,6 @@ impl interpret::Provenance for Provenance {
}
Ok(())
}

fn join(left: Self, right: Self) -> Option<Self> {
match (left, right) {
// If both are the *same* concrete tag, that is the result.
(
Provenance::Concrete { alloc_id: left_alloc, tag: left_tag },
Provenance::Concrete { alloc_id: right_alloc, tag: right_tag },
) if left_alloc == right_alloc && left_tag == right_tag => Some(left),
// If one side is a wildcard, the best possible outcome is that it is equal to the other
// one, and we use that.
(Provenance::Wildcard, o) | (o, Provenance::Wildcard) => Some(o),
// Otherwise, fall back to `None`.
_ => None,
}
}
}

impl fmt::Debug for ProvenanceExtra {
Expand Down
7 changes: 5 additions & 2 deletions src/shims/native_lib/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
match evt {
AccessEvent::Read(_) => {
// If a provenance was read by the foreign code, expose it.
for prov in alloc.provenance().get_range(this, overlap.into()) {
for (_prov_range, prov) in
alloc.provenance().get_range(overlap.into(), this)
{
this.expose_provenance(prov)?;
}
}
Expand Down Expand Up @@ -321,7 +323,8 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
// Expose all provenances in the allocation within the byte range of the struct, if
// any. These pointers are being directly passed to native code by-value.
let alloc = this.get_alloc_raw(id)?;
for prov in alloc.provenance().get_range(this, range.clone().into()) {
for (_prov_range, prov) in alloc.provenance().get_range(range.clone().into(), this)
{
expose(prov)?;
}
// Read the bytes that make up this argument. We cannot use the normal getter as
Expand Down