diff --git a/rust-version b/rust-version index 1f717dbd6ed5..0866489745ac 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -1a4b9a85634c17a60e8802307510c300a35a4b9b +fbdb10f9fabe47eb763cb4b52b5721740cc63783 diff --git a/src/operator.rs b/src/operator.rs index 59099469a332..61c72270e9f7 100644 --- a/src/operator.rs +++ b/src/operator.rs @@ -61,7 +61,7 @@ impl<'mir, 'tcx> EvalContextExt<'tcx> for super::MiriEvalContext<'mir, 'tcx> { let pointee_ty = left.layout.ty.builtin_deref(true).expect("Offset called on non-ptr type").ty; let ptr = self.ptr_offset_inbounds( - self.scalar_to_ptr(left.to_scalar()?), + self.scalar_to_ptr(left.to_scalar()?)?, pointee_ty, right.to_scalar()?.to_machine_isize(self)?, )?; diff --git a/src/shims/panic.rs b/src/shims/panic.rs index 4190cccae6d0..8f4e3f578ee9 100644 --- a/src/shims/panic.rs +++ b/src/shims/panic.rs @@ -146,7 +146,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx // Push the `catch_fn` stackframe. let f_instance = - this.get_ptr_fn(this.scalar_to_ptr(catch_unwind.catch_fn))?.as_instance()?; + this.get_ptr_fn(this.scalar_to_ptr(catch_unwind.catch_fn)?)?.as_instance()?; trace!("catch_fn: {:?}", f_instance); let ret_place = MPlaceTy::dangling(this.machine.layouts.unit).into(); this.call_function( diff --git a/src/shims/posix/linux/sync.rs b/src/shims/posix/linux/sync.rs index 362373bb7d3b..72898baa4b0a 100644 --- a/src/shims/posix/linux/sync.rs +++ b/src/shims/posix/linux/sync.rs @@ -121,7 +121,7 @@ pub fn futex<'tcx>( // The API requires `addr` to be a 4-byte aligned pointer, and will // use the 4 bytes at the given address as an (atomic) i32. this.check_ptr_access_align( - this.scalar_to_ptr(addr_scalar), + this.scalar_to_ptr(addr_scalar)?, Size::from_bytes(4), Align::from_bytes(4).unwrap(), CheckInAllocMsg::MemoryAccessTest, diff --git a/src/shims/tls.rs b/src/shims/tls.rs index 297d0c1228a4..ceed123c7ac4 100644 --- a/src/shims/tls.rs +++ b/src/shims/tls.rs @@ -249,7 +249,7 @@ trait EvalContextPrivExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx "p_thread_callback", ])?; let thread_callback = - this.get_ptr_fn(this.scalar_to_ptr(thread_callback))?.as_instance()?; + this.get_ptr_fn(this.scalar_to_ptr(thread_callback)?)?.as_instance()?; // The signature of this function is `unsafe extern "system" fn(h: c::LPVOID, dwReason: c::DWORD, pv: c::LPVOID)`. let reason = this.eval_path_scalar(&["std", "sys", "windows", "c", "DLL_THREAD_DETACH"])?;