Interpreter: hitting a Terminator::None returns as if a trap

This commit is contained in:
Chris Fallin 2023-04-17 14:43:24 -07:00
parent b9e1f5432c
commit b9b02eeff6

View file

@ -227,7 +227,7 @@ impl InterpContext {
}
match &body.blocks[frame.cur_block].terminator {
&Terminator::None => unreachable!(),
&Terminator::None => return InterpResult::Trap,
&Terminator::Unreachable => return InterpResult::Trap,
&Terminator::Br { ref target } => {
frame.apply_target(body, target);