diff --git a/src/librustc_mir/interpret/memory.rs b/src/librustc_mir/interpret/memory.rs index e251d7ec2bbf..b62add8a559b 100644 --- a/src/librustc_mir/interpret/memory.rs +++ b/src/librustc_mir/interpret/memory.rs @@ -799,6 +799,7 @@ pub fn write_scalar( signed: bool, ) -> EvalResult<'tcx> { let endianness = self.endianness(); + self.check_align(ptr, ptr_align)?; let val = match val { ScalarMaybeUndef::Scalar(scalar) => scalar,