Add comment

This commit is contained in:
David Cook 2020-09-02 20:58:41 -05:00
parent 7a2c6812b9
commit a6746ad893

View file

@ -401,6 +401,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
if let Some(errno_place) = this.active_thread_ref().last_error {
Ok(errno_place)
} else {
// Allocate new place, set initial value to 0.
let errno_layout = this.machine.layouts.u32;
let errno_place = this.allocate(errno_layout, MiriMemoryKind::Machine.into());
this.write_scalar(Scalar::from_u32(0), errno_place.into())?;