Skip to content

Commit decad31

Browse files
Check vtable projections for validity in miri
1 parent d3903c8 commit decad31

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,10 @@ impl<'gcc, 'tcx> ConstCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
224224
value
225225
}
226226
GlobalAlloc::Function { instance, .. } => self.get_fn_addr(instance),
227-
GlobalAlloc::VTable(ty, trait_ref) => {
227+
GlobalAlloc::VTable(ty, dyn_ty) => {
228228
let alloc = self
229229
.tcx
230-
.global_alloc(self.tcx.vtable_allocation((ty, trait_ref)))
230+
.global_alloc(self.tcx.vtable_allocation((ty, dyn_ty.principal())))
231231
.unwrap_memory();
232232
let init = const_alloc_to_gcc(self, alloc);
233233
self.static_addr_of(init, alloc.inner().align, None)

0 commit comments

Comments
 (0)