Skip to content

Commit 8a8fa53

Browse files
committed
Transform the last error place to an immediate instead
1 parent 619ccf3 commit 8a8fa53

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/shims/foreign_items.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
415415

416416
"__errno_location" | "__error" => {
417417
let errno_place = this.machine.last_error.unwrap();
418-
let errno_scalar: Scalar<Tag> = this.check_mplace_access(errno_place.into(), Some(Size::from_bits(32)))?.unwrap().into();
419-
this.write_scalar(errno_scalar, dest)?;
418+
this.write_scalar(errno_place.to_ref().to_scalar()?, dest)?;
420419
}
421420

422421
"getenv" => {

0 commit comments

Comments
 (0)