Skip to content

Commit

Permalink
check Allocation invariant during printing
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Apr 18, 2022
1 parent 29cc8ec commit 05489e7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_middle/src/mir/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 05489e7

Please sign in to comment.