address nits
This commit is contained in:
parent
dc4b2771f8
commit
b2ddd27c2e
2 changed files with 2 additions and 1 deletions
|
|
@ -855,6 +855,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M> {
|
|||
return Ok(());
|
||||
}
|
||||
let ptr = ptr.to_ptr()?;
|
||||
// Check bounds, align and relocations on the edges
|
||||
self.get_bytes_with_undef_and_ptr(ptr, size, align)?;
|
||||
// Check undef, and maybe ptr
|
||||
self.check_defined(ptr, size)?;
|
||||
|
|
|
|||
|
|
@ -511,7 +511,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
|
|||
// This is the size in bytes of the whole array.
|
||||
let size = Size::from_bytes(ty_size * len);
|
||||
|
||||
// In run-time mode, we accept points in here. This is actually more
|
||||
// In run-time mode, we accept pointers in here. This is actually more
|
||||
// permissive than a per-element check would be, e.g. we accept
|
||||
// an &[u8] that contains a pointer even though bytewise checking would
|
||||
// reject it. However, that's good: We don't inherently want
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue