Interpreter: hitting a Terminator::None returns as if a trap
This commit is contained in:
parent
b9e1f5432c
commit
b9b02eeff6
|
@ -227,7 +227,7 @@ impl InterpContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
match &body.blocks[frame.cur_block].terminator {
|
match &body.blocks[frame.cur_block].terminator {
|
||||||
&Terminator::None => unreachable!(),
|
&Terminator::None => return InterpResult::Trap,
|
||||||
&Terminator::Unreachable => return InterpResult::Trap,
|
&Terminator::Unreachable => return InterpResult::Trap,
|
||||||
&Terminator::Br { ref target } => {
|
&Terminator::Br { ref target } => {
|
||||||
frame.apply_target(body, target);
|
frame.apply_target(body, target);
|
||||||
|
|
Loading…
Reference in a new issue