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 | eb0bc4759ba679abd2cac5995f01fa47eadd3c14 (patch) | |
| tree | 6b4cb75ce8e22ade8fd39af143f2716a3a1aee4f /src | |
| parent | 358419cc25a86cfc48bbf30041f29b955bd2c881 (diff) | |
| parent | e876f43599acf69a094ecbbbc04c10d7d8f58356 (diff) | |
| download | rust-eb0bc4759ba679abd2cac5995f01fa47eadd3c14.tar.gz rust-eb0bc4759ba679abd2cac5995f01fa47eadd3c14.zip | |
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 'src')
| -rw-r--r-- | src/consts.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/consts.rs b/src/consts.rs index 81f53328867..111bfeb1322 100644 --- a/src/consts.rs +++ b/src/consts.rs @@ -297,12 +297,12 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> { pub fn const_alloc_to_gcc<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, alloc: ConstAllocation<'tcx>) -> RValue<'gcc> { let alloc = alloc.inner(); - let mut llvals = Vec::with_capacity(alloc.provenance().len() + 1); + let mut llvals = Vec::with_capacity(alloc.provenance().ptrs().len() + 1); let dl = cx.data_layout(); let pointer_size = dl.pointer_size.bytes() as usize; let mut next_offset = 0; - for &(offset, alloc_id) in alloc.provenance().iter() { + for &(offset, alloc_id) in alloc.provenance().ptrs().iter() { let offset = offset.bytes(); assert_eq!(offset as usize as u64, offset); let offset = offset as usize; |
