mirror of
https://github.com/fluencelabs/wasmer
synced 2025-03-16 16:20:49 +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) {
|
||||
Ok(SIGILL) => match trapcode {
|
||||
TrapCode::BadSignature => ExceptionCode::IncorrectCallIndirectSignature,
|
||||
TrapCode::IndirectCallToNull => ExceptionCode::CallIndirectOOB,
|
||||
TrapCode::StackOverflow => ExceptionCode::MemoryOutOfBounds,
|
||||
TrapCode::HeapOutOfBounds => ExceptionCode::MemoryOutOfBounds,
|
||||
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(
|
||||
"unknown clif trap code".to_string(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user