diff --git a/src/eval.rs b/src/eval.rs index e5dfbe32c12..1e9332c9a32 100644 --- a/src/eval.rs +++ b/src/eval.rs @@ -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)?; diff --git a/src/stacked_borrows.rs b/src/stacked_borrows.rs index 77295e8dd53..ace4fef3ce3 100644 --- a/src/stacked_borrows.rs +++ b/src/stacked_borrows.rs @@ -643,8 +643,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx this.write_immediate(val, place)?; } - this.process_errors(); - Ok(()) } }