From 6dd700fd177e22ab24b97c175ea9ce8611c07932 Mon Sep 17 00:00:00 2001 From: Philippe Nadon Date: Mon, 27 Jul 2020 13:07:25 -0600 Subject: [PATCH] Changed not_undef to check_init in foreign_items.rs Due to changes from upstream, a commit using not_undef was inserted, which had to be updated to use check_init. related issue #71193 --- 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 d4f248f0329d..98e66db92da3 100644 --- a/src/shims/foreign_items.rs +++ b/src/shims/foreign_items.rs @@ -200,7 +200,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx // Miri-specific extern functions "miri_static_root" => { let &[ptr] = check_arg_count(args)?; - let ptr = this.read_scalar(ptr)?.not_undef()?; + let ptr = this.read_scalar(ptr)?.check_init()?; let ptr = this.force_ptr(ptr)?; if ptr.offset != Size::ZERO { throw_unsup_format!("pointer passed to miri_static_root must point to beginning of an allocated block");