Skip to content

Commit d7ee32d

Browse files
committed
Use unaligned mplace, test passed
1 parent f31c47b commit d7ee32d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shims/unix/linux/eventfd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl FileDescription for Event {
6868
ecx: &mut MiriInterpCx<'tcx>,
6969
) -> InterpResult<'tcx> {
7070
// eventfd read at the size of u64.
71-
let buf_place = ecx.ptr_to_mplace(ptr, ecx.machine.layouts.u64);
71+
let buf_place = ecx.ptr_to_mplace_unaligned(ptr, ecx.machine.layouts.u64);
7272
// Check the size of slice, and return error only if the size of the slice < 8.
7373
if len < U64_ARRAY_SIZE.try_into().unwrap() {
7474
let result = Err(Error::from(ErrorKind::InvalidInput));

0 commit comments

Comments
 (0)