From 4fa243be78e4be2ca8d5e79fea26fe87deb720ae Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 1 Jul 2019 23:07:40 +0200 Subject: [PATCH] adjust for get_fn signature change --- src/shims/foreign_items.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shims/foreign_items.rs b/src/shims/foreign_items.rs index 7ab97c87e305..9dbb55668ef3 100644 --- a/src/shims/foreign_items.rs +++ b/src/shims/foreign_items.rs @@ -338,7 +338,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx // vtable_ptr: *mut usize, // ) -> u32 // We abort on panic, so not much is going on here, but we still have to call the closure. - let f = this.read_scalar(args[0])?.to_ptr()?; + let f = this.read_scalar(args[0])?.not_undef()?; let data = this.read_scalar(args[1])?.not_undef()?; let f_instance = this.memory().get_fn(f)?.as_instance()?; this.write_null(dest)?;