Improve miri's error reporting in check_in_alloc
This commit is contained in:
parent
e5b6fab576
commit
11464e714a
1 changed files with 2 additions and 1 deletions
|
|
@ -252,7 +252,8 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M> {
|
|||
Scalar::Ptr(ptr) => {
|
||||
// check this is not NULL -- which we can ensure only if this is in-bounds
|
||||
// of some (potentially dead) allocation.
|
||||
let align = self.check_bounds_ptr(ptr, InboundsCheck::MaybeDead, CheckInAllocMsg::NullPointer)?;
|
||||
let align = self.check_bounds_ptr(ptr, InboundsCheck::MaybeDead,
|
||||
CheckInAllocMsg::NullPointer)?;
|
||||
(ptr.offset.bytes(), align)
|
||||
}
|
||||
Scalar::Bits { bits, size } => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue