Skip to content

Commit aec175e

Browse files
committed
Process delayed errors on every step
1 parent bb58e42 commit aec175e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/eval.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,9 @@ pub fn eval_main<'tcx>(tcx: TyCtxt<'tcx>, main_id: DefId, config: MiriConfig) ->
183183

184184
// Perform the main execution.
185185
let res: InterpResult<'_, i64> = (|| {
186-
ecx.run()?;
186+
while ecx.step()? {
187+
ecx.process_errors();
188+
}
187189
// Read the return code pointer *before* we run TLS destructors, to assert
188190
// that it was written to by the time that `start` lang item returned.
189191
let return_code = ecx.read_scalar(ret_place.into())?.not_undef()?.to_machine_isize(&ecx)?;

src/stacked_borrows.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -643,8 +643,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
643643
this.write_immediate(val, place)?;
644644
}
645645

646-
this.process_errors();
647-
648646
Ok(())
649647
}
650648
}

0 commit comments

Comments
 (0)