From edf1bfd38565f4e879ca8b849ba9bf49c1014478 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 29 Oct 2025 17:47:36 +0100 Subject: [PATCH 1/2] const-eval: fix and re-enable pointer fragment support --- src/machine.rs | 15 --------------- src/shims/native_lib/mod.rs | 7 +++++-- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/src/machine.rs b/src/machine.rs index 982b6c3fbb..502cdbdc57 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -351,21 +351,6 @@ impl interpret::Provenance for Provenance { } Ok(()) } - - fn join(left: Self, right: Self) -> Option { - 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 { diff --git a/src/shims/native_lib/mod.rs b/src/shims/native_lib/mod.rs index 483da4b67b..445f9618e7 100644 --- a/src/shims/native_lib/mod.rs +++ b/src/shims/native_lib/mod.rs @@ -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)?; } } @@ -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 From 722d9bfd3bc9d016ec9161e14fd8b390454e8d1a Mon Sep 17 00:00:00 2001 From: The Miri Cronjob Bot Date: Mon, 17 Nov 2025 04:55:09 +0000 Subject: [PATCH 2/2] Prepare for merging from rust-lang/rust This updates the rust-version file to 69d4d5fc0e4db60272aac85ef27ecccef5764f3a. --- rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-version b/rust-version index 06a5970646..25bb5e9231 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -7a72c5459dd58f81b0e1a0e5436d145485889375 +69d4d5fc0e4db60272aac85ef27ecccef5764f3a