Transform the last error place to an immediate instead

This commit is contained in:
Christian Poveda 2019-10-18 14:44:48 -05:00
parent 619ccf3834
commit 8a8fa53a5d

View file

@ -415,8 +415,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
"__errno_location" | "__error" => {
let errno_place = this.machine.last_error.unwrap();
let errno_scalar: Scalar<Tag> = this.check_mplace_access(errno_place.into(), Some(Size::from_bits(32)))?.unwrap().into();
this.write_scalar(errno_scalar, dest)?;
this.write_scalar(errno_place.to_ref().to_scalar()?, dest)?;
}
"getenv" => {