@@ -135,6 +135,7 @@ pub trait EvalContextExt<'a, 'mir, 'tcx: 'a + 'mir>: crate::MiriEvalContextExt<'
135
135
// 'payload'. This should help catch some basic errors in
136
136
// the caller of this function, even in abort mode
137
137
if this. tcx . tcx . sess . panic_strategy ( ) == PanicStrategy :: Abort {
138
+ // FIXME: Actually print out the payload here
138
139
return err ! ( MachineError ( "the evaluated program abort-panicked" . to_string( ) ) ) ;
139
140
}
140
141
@@ -1056,9 +1057,6 @@ fn unwind_stack<'a, 'mir, 'tcx>(
1056
1057
payload_data_ptr : Scalar < Borrow > ,
1057
1058
payload_vtable_ptr : Scalar < Borrow >
1058
1059
) -> EvalResult < ' tcx > {
1059
-
1060
- let mut found = false ;
1061
-
1062
1060
while !this. stack ( ) . is_empty ( ) {
1063
1061
// When '__rust_maybe_catch_panic' is called, it marks is frame
1064
1062
// with 'catch_panic'. When we find this marker, we've found
@@ -1087,9 +1085,8 @@ fn unwind_stack<'a, 'mir, 'tcx>(
1087
1085
// We're done - continue execution in the frame of the function
1088
1086
// that called '__rust_maybe_catch_panic,'
1089
1087
this. goto_block ( Some ( ret) ) ?;
1090
- found = true ;
1091
1088
1092
- break ;
1089
+ return Ok ( ( ) )
1093
1090
} else {
1094
1091
// This frame is above our target frame on the call stack.
1095
1092
// We pop it off the stack, running its 'unwind' block if applicable
@@ -1118,9 +1115,7 @@ fn unwind_stack<'a, 'mir, 'tcx>(
1118
1115
}
1119
1116
}
1120
1117
1121
- if !found {
1122
- // The 'start_fn' lang item should always install a panic handler
1123
- return err ! ( Unreachable ) ;
1124
- }
1125
- return Ok ( ( ) )
1118
+ // We should never get here:
1119
+ // The 'start_fn' lang item should always install a panic handler
1120
+ return err ! ( Unreachable ) ;
1126
1121
}
0 commit comments