@@ -216,6 +216,7 @@ pub trait EvalContextExt<'a, 'mir, 'tcx: 'a + 'mir>: crate::MiriEvalContextExt<'
216216 // 'payload'. This should help catch some basic errors in
217217 // the caller of this function, even in abort mode
218218 if this. tcx . tcx . sess . panic_strategy ( ) == PanicStrategy :: Abort {
219+ // FIXME: Actually print out the payload here
219220 return err ! ( MachineError ( "the evaluated program abort-panicked" . to_string( ) ) ) ;
220221 }
221222
@@ -1171,9 +1172,6 @@ fn unwind_stack<'a, 'mir, 'tcx>(
11711172 payload_data_ptr : Scalar < Borrow > ,
11721173 payload_vtable_ptr : Scalar < Borrow >
11731174) -> EvalResult < ' tcx > {
1174-
1175- let mut found = false ;
1176-
11771175 while !this. stack ( ) . is_empty ( ) {
11781176 // When '__rust_maybe_catch_panic' is called, it marks is frame
11791177 // with 'catch_panic'. When we find this marker, we've found
@@ -1202,9 +1200,8 @@ fn unwind_stack<'a, 'mir, 'tcx>(
12021200 // We're done - continue execution in the frame of the function
12031201 // that called '__rust_maybe_catch_panic,'
12041202 this. goto_block ( Some ( ret) ) ?;
1205- found = true ;
12061203
1207- break ;
1204+ return Ok ( ( ) )
12081205 } else {
12091206 // This frame is above our target frame on the call stack.
12101207 // We pop it off the stack, running its 'unwind' block if applicable
@@ -1233,9 +1230,7 @@ fn unwind_stack<'a, 'mir, 'tcx>(
12331230 }
12341231 }
12351232
1236- if !found {
1237- // The 'start_fn' lang item should always install a panic handler
1238- return err ! ( Unreachable ) ;
1239- }
1240- return Ok ( ( ) )
1233+ // We should never get here:
1234+ // The 'start_fn' lang item should always install a panic handler
1235+ return err ! ( Unreachable ) ;
12411236}
0 commit comments