Check vtable projections for validity in miri
This commit is contained in:
parent
d3903c8de3
commit
decad31d94
1 changed files with 2 additions and 2 deletions
|
@ -224,10 +224,10 @@ impl<'gcc, 'tcx> ConstCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
|
|||
value
|
||||
}
|
||||
GlobalAlloc::Function { instance, .. } => self.get_fn_addr(instance),
|
||||
GlobalAlloc::VTable(ty, trait_ref) => {
|
||||
GlobalAlloc::VTable(ty, dyn_ty) => {
|
||||
let alloc = self
|
||||
.tcx
|
||||
.global_alloc(self.tcx.vtable_allocation((ty, trait_ref)))
|
||||
.global_alloc(self.tcx.vtable_allocation((ty, dyn_ty.principal())))
|
||||
.unwrap_memory();
|
||||
let init = const_alloc_to_gcc(self, alloc);
|
||||
self.static_addr_of(init, alloc.inner().align, None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue