Skip to content

Commit 46fef8d

Browse files
authored
Merge pull request #4235 from RalfJung/catch_unwind
catch_unwind: do not permit catch function to unwind
2 parents 641b8a5 + be7cae6 commit 46fef8d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/shims/panic.rs

Lines changed: 2 additions & 1 deletion
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)