提交 38104abf 编写于 作者: R Ralf Jung

expand comment

上级 9954af4a
...@@ -289,7 +289,8 @@ fn check_offset_align(offset: u64, align: Align) -> InterpResult<'static> { ...@@ -289,7 +289,8 @@ fn check_offset_align(offset: u64, align: Align) -> InterpResult<'static> {
// Normalize to a `Pointer` if we definitely need one. // Normalize to a `Pointer` if we definitely need one.
let normalized = if size.bytes() == 0 { let normalized = if size.bytes() == 0 {
// Can be an integer, just take what we got. // Can be an integer, just take what we got. We do NOT `force_bits` here;
// if this is already a `Pointer` we want to do the bounds checks!
sptr sptr
} else { } else {
// A "real" access, we must get a pointer. // A "real" access, we must get a pointer.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册