diff options
| author | bors <bors@rust-lang.org> | 2022-11-15 17:37:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-11-15 17:37:15 +0000 |
| commit | a00f8ba7fcac1b27341679c51bf5a3271fa82df3 (patch) | |
| tree | 155672e116c8913192ba36b4a9e0f668e387c3ad /compiler/rustc_monomorphize/src | |
| parent | 6d651a295e0e0c331153288b10b78344a4ede20b (diff) | |
| parent | 68af46c1121d14a3d89ec56cd4ed2fef829bae75 (diff) | |
Auto merge of #104054 - RalfJung:byte-provenance, r=oli-obk
interpret: support for per-byte provenance Also factors the provenance map into its own module. The third commit does the same for the init mask. I can move it in a separate PR if you prefer. Fixes https://github.com/rust-lang/miri/issues/2181 r? `@oli-obk`
Diffstat (limited to 'compiler/rustc_monomorphize/src')
| -rw-r--r-- | compiler/rustc_monomorphize/src/collector.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index 58ddb807059..e296d4766c1 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -456,7 +456,7 @@ fn collect_items_rec<'tcx>( recursion_depth_reset = None; if let Ok(alloc) = tcx.eval_static_initializer(def_id) { - for &id in alloc.inner().provenance().values() { + for &id in alloc.inner().provenance().ptrs().values() { collect_miri(tcx, id, &mut neighbors); } } @@ -1404,7 +1404,7 @@ fn collect_miri<'tcx>(tcx: TyCtxt<'tcx>, alloc_id: AllocId, output: &mut MonoIte } GlobalAlloc::Memory(alloc) => { trace!("collecting {:?} with {:#?}", alloc_id, alloc); - for &inner in alloc.inner().provenance().values() { + for &inner in alloc.inner().provenance().ptrs().values() { rustc_data_structures::stack::ensure_sufficient_stack(|| { collect_miri(tcx, inner, output); }); @@ -1443,7 +1443,7 @@ fn collect_const_value<'tcx>( match value { ConstValue::Scalar(Scalar::Ptr(ptr, _size)) => collect_miri(tcx, ptr.provenance, output), ConstValue::Slice { data: alloc, start: _, end: _ } | ConstValue::ByRef { alloc, .. } => { - for &id in alloc.inner().provenance().values() { + for &id in alloc.inner().provenance().ptrs().values() { collect_miri(tcx, id, output); } } |
