cranelift: Prevent panics when dividing INT_MIN / -1 in interpreter
This commit is contained in:
committed by
Andrew Brown
parent
7b8ab065c6
commit
3f6b889067
@@ -81,6 +81,9 @@ where
|
||||
Err(ValueError::IntegerDivisionByZero) => Ok(ControlFlow::Trap(CraneliftTrap::User(
|
||||
TrapCode::IntegerDivisionByZero,
|
||||
))),
|
||||
Err(ValueError::IntegerOverflow) => Ok(ControlFlow::Trap(CraneliftTrap::User(
|
||||
TrapCode::IntegerOverflow,
|
||||
))),
|
||||
Err(e) => Err(e),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user