Skip to content

Commit 03e3cc5

Browse files
committed
Auto merge of rust-lang#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 rust-lang/miri#2181 r? `@oli-obk`
2 parents f5caaea + b5523e3 commit 03e3cc5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/constant.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ fn define_all_allocs(tcx: TyCtxt<'_>, module: &mut dyn Module, cx: &mut Constant
398398
let bytes = alloc.inspect_with_uninit_and_ptr_outside_interpreter(0..alloc.len()).to_vec();
399399
data_ctx.define(bytes.into_boxed_slice());
400400

401-
for &(offset, alloc_id) in alloc.provenance().iter() {
401+
for &(offset, alloc_id) in alloc.provenance().ptrs().iter() {
402402
let addend = {
403403
let endianness = tcx.data_layout.endian;
404404
let offset = offset.bytes() as usize;
@@ -431,7 +431,7 @@ fn define_all_allocs(tcx: TyCtxt<'_>, module: &mut dyn Module, cx: &mut Constant
431431
{
432432
tcx.sess.fatal(&format!(
433433
"Allocation {:?} contains reference to TLS value {:?}",
434-
alloc, def_id
434+
alloc_id, def_id
435435
));
436436
}
437437

0 commit comments

Comments
 (0)