Process delayed errors on every step

This commit is contained in:
Oliver Scherer 2020-01-08 12:49:46 +01:00
parent bb58e42da2
commit aec175e0de
2 changed files with 3 additions and 3 deletions

View File

@ -183,7 +183,9 @@ pub fn eval_main<'tcx>(tcx: TyCtxt<'tcx>, main_id: DefId, config: MiriConfig) ->
// Perform the main execution.
let res: InterpResult<'_, i64> = (|| {
ecx.run()?;
while ecx.step()? {
ecx.process_errors();
}
// Read the return code pointer *before* we run TLS destructors, to assert
// that it was written to by the time that `start` lang item returned.
let return_code = ecx.read_scalar(ret_place.into())?.not_undef()?.to_machine_isize(&ecx)?;

View File

@ -643,8 +643,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
this.write_immediate(val, place)?;
}
this.process_errors();
Ok(())
}
}