提交 a01efbcb 编写于 作者: R Ralf Jung

operand-to-place copies should never be overlapping

上级 312f3827
......@@ -823,6 +823,8 @@ fn copy_op_no_validate(
let src = match self.try_read_immediate(src)? {
Ok(src_val) => {
// Yay, we got a value that we can write directly.
// FIXME: Add a check to make sure that if `src` is indirect,
// it does not overlap with `dest`.
return self.write_immediate_no_validate(src_val, dest);
}
Err(mplace) => mplace,
......@@ -836,7 +838,8 @@ fn copy_op_no_validate(
self.memory.copy(
src_ptr, src_align,
dest_ptr, dest_align,
dest.layout.size, false
dest.layout.size,
/*nonoverlapping*/ true,
)?;
Ok(())
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册