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