@@ -215,6 +215,7 @@ pub trait EvalContextExt<'a, 'mir, 'tcx: 'a + 'mir>: crate::MiriEvalContextExt<'
215215 // 'payload'. This should help catch some basic errors in
216216 // the caller of this function, even in abort mode
217217 if this. tcx . tcx . sess . panic_strategy ( ) == PanicStrategy :: Abort {
218+ // FIXME: Actually print out the payload here
218219 return err ! ( MachineError ( "the evaluated program abort-panicked" . to_string( ) ) ) ;
219220 }
220221
@@ -1169,9 +1170,6 @@ fn unwind_stack<'a, 'mir, 'tcx>(
11691170 payload_data_ptr : Scalar < Borrow > ,
11701171 payload_vtable_ptr : Scalar < Borrow >
11711172) -> EvalResult < ' tcx > {
1172-
1173- let mut found = false ;
1174-
11751173 while !this. stack ( ) . is_empty ( ) {
11761174 // When '__rust_maybe_catch_panic' is called, it marks is frame
11771175 // with 'catch_panic'. When we find this marker, we've found
@@ -1200,9 +1198,8 @@ fn unwind_stack<'a, 'mir, 'tcx>(
12001198 // We're done - continue execution in the frame of the function
12011199 // that called '__rust_maybe_catch_panic,'
12021200 this. goto_block ( Some ( ret) ) ?;
1203- found = true ;
12041201
1205- break ;
1202+ return Ok ( ( ) )
12061203 } else {
12071204 // This frame is above our target frame on the call stack.
12081205 // We pop it off the stack, running its 'unwind' block if applicable
@@ -1231,9 +1228,7 @@ fn unwind_stack<'a, 'mir, 'tcx>(
12311228 }
12321229 }
12331230
1234- if !found {
1235- // The 'start_fn' lang item should always install a panic handler
1236- return err ! ( Unreachable ) ;
1237- }
1238- return Ok ( ( ) )
1231+ // We should never get here:
1232+ // The 'start_fn' lang item should always install a panic handler
1233+ return err ! ( Unreachable ) ;
12391234}
0 commit comments