Skip to content

Commit eb0bc47

Browse files
committed
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 rust-lang/miri#2181 r? `@oli-obk`
2 parents 358419c + e876f43 commit eb0bc47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/consts.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,12 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
297297

298298
pub fn const_alloc_to_gcc<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, alloc: ConstAllocation<'tcx>) -> RValue<'gcc> {
299299
let alloc = alloc.inner();
300-
let mut llvals = Vec::with_capacity(alloc.provenance().len() + 1);
300+
let mut llvals = Vec::with_capacity(alloc.provenance().ptrs().len() + 1);
301301
let dl = cx.data_layout();
302302
let pointer_size = dl.pointer_size.bytes() as usize;
303303

304304
let mut next_offset = 0;
305-
for &(offset, alloc_id) in alloc.provenance().iter() {
305+
for &(offset, alloc_id) in alloc.provenance().ptrs().iter() {
306306
let offset = offset.bytes();
307307
assert_eq!(offset as usize as u64, offset);
308308
let offset = offset as usize;

0 commit comments

Comments
 (0)