Skip to content

Commit 38e7bb0

Browse files
committed
catch_unwind: do not permit catch function to unwind
1 parent 08e79dd commit 38e7bb0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tools/miri/src/shims/panic.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
144144
// Directly return to caller of `try`.
145145
StackPopCleanup::Goto {
146146
ret: catch_unwind.ret,
147-
unwind: mir::UnwindAction::Continue,
147+
// `catch_fn` must not unwind.
148+
unwind: mir::UnwindAction::Unreachable,
148149
},
149150
)?;
150151

0 commit comments

Comments
 (0)