mirror of
https://github.com/fluencelabs/wasmer
synced 2025-04-24 18:02:13 +00:00
Fix merge errors and update llvm to use the new runtime error type.
This commit is contained in:
parent
4e198bca8b
commit
039ebdcf75
1682
Cargo.lock
generated
Normal file
1682
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,7 @@ authors = ["Lachlan Sneff <lachlan.sneff@gmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
wasmer-runtime-core = { path = "../runtime-core", version = "0.1.2" }
|
||||
wasmer-runtime-core = { path = "../runtime-core", version = "0.2.1" }
|
||||
wasmparser = "0.28.0"
|
||||
inkwell = { git = "https://github.com/TheDan64/inkwell", branch = "llvm7-0" }
|
||||
hashbrown = "0.1.8"
|
||||
|
@ -10,6 +10,7 @@ use libc::{
|
||||
PROT_WRITE,
|
||||
};
|
||||
use std::{
|
||||
any::Any,
|
||||
ffi::CString,
|
||||
mem,
|
||||
ptr::{self, NonNull},
|
||||
@ -397,20 +398,17 @@ impl ProtectedCaller for LLVMProtectedCaller {
|
||||
.collect())
|
||||
} else {
|
||||
Err(match trap_out {
|
||||
WasmTrapType::Unreachable => RuntimeError::User {
|
||||
WasmTrapType::Unreachable => RuntimeError::Trap {
|
||||
msg: "unreachable".into(),
|
||||
},
|
||||
WasmTrapType::IncorrectCallIndirectSignature => {
|
||||
RuntimeError::IndirectCallSignature {
|
||||
table: TableIndex::new(0),
|
||||
}
|
||||
}
|
||||
WasmTrapType::MemoryOutOfBounds => RuntimeError::OutOfBoundsAccess {
|
||||
memory: MemoryIndex::new(0),
|
||||
addr: None,
|
||||
WasmTrapType::IncorrectCallIndirectSignature => RuntimeError::Trap {
|
||||
msg: "uncorrect call_indirect signature".into(),
|
||||
},
|
||||
WasmTrapType::Unknown => RuntimeError::Unknown {
|
||||
msg: "unknown error".into(),
|
||||
WasmTrapType::MemoryOutOfBounds => RuntimeError::Trap {
|
||||
msg: "memory out-of-bounds access".into(),
|
||||
},
|
||||
WasmTrapType::Unknown => RuntimeError::Trap {
|
||||
msg: "unknown trap".into(),
|
||||
},
|
||||
})
|
||||
}
|
||||
@ -422,8 +420,8 @@ impl ProtectedCaller for LLVMProtectedCaller {
|
||||
}
|
||||
|
||||
impl UserTrapper for Placeholder {
|
||||
unsafe fn do_early_trap(&self, msg: String) -> ! {
|
||||
unimplemented!("do early trap: {}", msg)
|
||||
unsafe fn do_early_trap(&self, _data: Box<dyn Any>) -> ! {
|
||||
unimplemented!("do early trap")
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user