mirror of
https://github.com/fluencelabs/wasmer
synced 2025-04-13 04:46:04 +00:00
Fix clif trap code conversions.
This commit is contained in:
parent
b40edd4512
commit
cc4b512bde
@ -90,10 +90,16 @@ pub fn call_protected<T>(
|
|||||||
{
|
{
|
||||||
Err(CallProtError(Box::new(match Signal::from_c_int(signum) {
|
Err(CallProtError(Box::new(match Signal::from_c_int(signum) {
|
||||||
Ok(SIGILL) => match trapcode {
|
Ok(SIGILL) => match trapcode {
|
||||||
TrapCode::BadSignature => ExceptionCode::IncorrectCallIndirectSignature,
|
TrapCode::StackOverflow => ExceptionCode::MemoryOutOfBounds,
|
||||||
TrapCode::IndirectCallToNull => ExceptionCode::CallIndirectOOB,
|
|
||||||
TrapCode::HeapOutOfBounds => ExceptionCode::MemoryOutOfBounds,
|
TrapCode::HeapOutOfBounds => ExceptionCode::MemoryOutOfBounds,
|
||||||
TrapCode::TableOutOfBounds => ExceptionCode::CallIndirectOOB,
|
TrapCode::TableOutOfBounds => ExceptionCode::CallIndirectOOB,
|
||||||
|
TrapCode::OutOfBounds => ExceptionCode::MemoryOutOfBounds,
|
||||||
|
TrapCode::IndirectCallToNull => ExceptionCode::CallIndirectOOB,
|
||||||
|
TrapCode::BadSignature => ExceptionCode::IncorrectCallIndirectSignature,
|
||||||
|
TrapCode::IntegerOverflow => ExceptionCode::IllegalArithmetic,
|
||||||
|
TrapCode::IntegerDivisionByZero => ExceptionCode::IllegalArithmetic,
|
||||||
|
TrapCode::BadConversionToInteger => ExceptionCode::IllegalArithmetic,
|
||||||
|
TrapCode::UnreachableCodeReached => ExceptionCode::Unreachable,
|
||||||
_ => {
|
_ => {
|
||||||
return Err(CallProtError(Box::new(
|
return Err(CallProtError(Box::new(
|
||||||
"unknown clif trap code".to_string(),
|
"unknown clif trap code".to_string(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user