Skip to content

Commit

Permalink
Use force_ptr instead of assert_ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdrz committed Sep 16, 2019
1 parent fa20338 commit 55863cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shims/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
if this.tcx.lang_items().align_offset_fn() == Some(instance.def.def_id()) {

let n = {
let ptr = this.read_scalar(args[0])?.not_undef()?.assert_ptr();
let ptr = this.force_ptr(this.read_scalar(args[0])?.not_undef()?)?;
let align = this.force_bits(
this.read_scalar(args[1])?.not_undef()?,
this.pointer_size()
Expand Down

0 comments on commit 55863cb

Please sign in to comment.