mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-26 14:43:24 +00:00
check Allocation invariant during printing
This commit is contained in:
parent
29cc8ec2d1
commit
05489e7ec8
@ -851,6 +851,7 @@ fn write_allocation_bytes<'tcx, Tag: Provenance, Extra>(
|
||||
}
|
||||
if let Some(&tag) = alloc.relocations().get(&i) {
|
||||
// Memory with a relocation must be defined
|
||||
assert!(alloc.init_mask().is_range_initialized(i, i + ptr_size).is_ok());
|
||||
let j = i.bytes_usize();
|
||||
let offset = alloc
|
||||
.inspect_with_uninit_and_ptr_outside_interpreter(j..j + ptr_size.bytes_usize());
|
||||
|
Loading…
Reference in New Issue
Block a user