mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 13:05:18 +03:00
Miri: fix ICE when unwinding past topmost stack frame
This commit is contained in:
@@ -718,6 +718,10 @@ pub(super) fn pop_stack_frame(&mut self, unwinding: bool) -> InterpResult<'tcx>
|
||||
}
|
||||
);
|
||||
|
||||
if unwinding && self.frame_idx() == 0 {
|
||||
throw_ub_format!("unwinding past the topmost frame of the stack");
|
||||
}
|
||||
|
||||
::log_settings::settings().indentation -= 1;
|
||||
let frame =
|
||||
self.stack_mut().pop().expect("tried to pop a stack frame, but there were none");
|
||||
|
||||
Reference in New Issue
Block a user