Skip to content

Commit 927c5aa

Browse files
committed
Use correct alignment for fat pointer extra part
1 parent 9d57adf commit 927c5aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_mir/interpret/operand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
295295
let a_val = self.memory
296296
.get(ptr.alloc_id)?
297297
.read_scalar(self, a_ptr, a_size)?;
298-
self.memory.check_align(b_ptr.into(), b.align(self))?;
298+
self.memory.check_align(b_ptr.into(), b.align(self).min(ptr_align))?;
299299
let b_val = self.memory
300300
.get(ptr.alloc_id)?
301301
.read_scalar(self, b_ptr, b_size)?;

0 commit comments

Comments
 (0)