From ab7f1c8a0ebc39ec0a07b806980aca38413f9e90 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Thu, 17 Jun 2021 18:41:43 +0200 Subject: [PATCH] Fix miscompilation in vtable access Fixes #1179 --- src/vtable.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vtable.rs b/src/vtable.rs index 4d1ee47b41e..3f78501bcb0 100644 --- a/src/vtable.rs +++ b/src/vtable.rs @@ -38,7 +38,7 @@ pub(crate) fn min_align_of_obj(fx: &mut FunctionCx<'_, '_, '_>, vtable: Value) - pointer_ty(fx.tcx), vtable_memflags(), vtable, - (ty::COMMON_VTABLE_ENTRIES_SIZE * usize_size) as i32, + (ty::COMMON_VTABLE_ENTRIES_ALIGN * usize_size) as i32, ) }