@@ -215,6 +215,7 @@ pub trait EvalContextExt<'a, 'mir, 'tcx: 'a + 'mir>: crate::MiriEvalContextExt<'
215
215
// 'payload'. This should help catch some basic errors in
216
216
// the caller of this function, even in abort mode
217
217
if this. tcx . tcx . sess . panic_strategy ( ) == PanicStrategy :: Abort {
218
+ // FIXME: Actually print out the payload here
218
219
return err ! ( MachineError ( "the evaluated program abort-panicked" . to_string( ) ) ) ;
219
220
}
220
221
@@ -1169,9 +1170,6 @@ fn unwind_stack<'a, 'mir, 'tcx>(
1169
1170
payload_data_ptr : Scalar < Borrow > ,
1170
1171
payload_vtable_ptr : Scalar < Borrow >
1171
1172
) -> EvalResult < ' tcx > {
1172
-
1173
- let mut found = false ;
1174
-
1175
1173
while !this. stack ( ) . is_empty ( ) {
1176
1174
// When '__rust_maybe_catch_panic' is called, it marks is frame
1177
1175
// with 'catch_panic'. When we find this marker, we've found
@@ -1200,9 +1198,8 @@ fn unwind_stack<'a, 'mir, 'tcx>(
1200
1198
// We're done - continue execution in the frame of the function
1201
1199
// that called '__rust_maybe_catch_panic,'
1202
1200
this. goto_block ( Some ( ret) ) ?;
1203
- found = true ;
1204
1201
1205
- break ;
1202
+ return Ok ( ( ) )
1206
1203
} else {
1207
1204
// This frame is above our target frame on the call stack.
1208
1205
// We pop it off the stack, running its 'unwind' block if applicable
@@ -1231,9 +1228,7 @@ fn unwind_stack<'a, 'mir, 'tcx>(
1231
1228
}
1232
1229
}
1233
1230
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 ) ;
1239
1234
}
0 commit comments