This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -459,8 +459,13 @@ pub fn eval_entry<'tcx>(
459459 ecx. handle_ice ( ) ;
460460 panic:: resume_unwind ( panic_payload)
461461 } ) ;
462- // `Ok` can never happen.
462+ // `Ok` can never happen; the interpreter loop always exits with an "error"
463+ // (but that "error" might be just "regular program termination").
463464 let Err ( err) = res. report_err ( ) ;
465+ // Show diagnostic, if any.
466+ let ( return_code, leak_check) = report_error ( & ecx, err) ?;
467+
468+ // If we get here there was no fatal error.
464469
465470 // Machine cleanup. Only do this if all threads have terminated; threads that are still running
466471 // might cause Stacked Borrows errors (https://github.com/rust-lang/miri/issues/2396).
@@ -472,8 +477,7 @@ pub fn eval_entry<'tcx>(
472477 EnvVars :: cleanup ( & mut ecx) . expect ( "error during env var cleanup" ) ;
473478 }
474479
475- // Process the result.
476- let ( return_code, leak_check) = report_error ( & ecx, err) ?;
480+ // Possibly check for memory leaks.
477481 if leak_check && !ignore_leaks {
478482 // Check for thread leaks.
479483 if !ecx. have_all_terminated ( ) {
You can’t perform that action at this time.
0 commit comments