mirror of
https://github.com/fluencelabs/wasmer
synced 2025-05-29 09:51:19 +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"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[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"
|
wasmparser = "0.28.0"
|
||||||
inkwell = { git = "https://github.com/TheDan64/inkwell", branch = "llvm7-0" }
|
inkwell = { git = "https://github.com/TheDan64/inkwell", branch = "llvm7-0" }
|
||||||
hashbrown = "0.1.8"
|
hashbrown = "0.1.8"
|
||||||
|
@ -10,6 +10,7 @@ use libc::{
|
|||||||
PROT_WRITE,
|
PROT_WRITE,
|
||||||
};
|
};
|
||||||
use std::{
|
use std::{
|
||||||
|
any::Any,
|
||||||
ffi::CString,
|
ffi::CString,
|
||||||
mem,
|
mem,
|
||||||
ptr::{self, NonNull},
|
ptr::{self, NonNull},
|
||||||
@ -397,20 +398,17 @@ impl ProtectedCaller for LLVMProtectedCaller {
|
|||||||
.collect())
|
.collect())
|
||||||
} else {
|
} else {
|
||||||
Err(match trap_out {
|
Err(match trap_out {
|
||||||
WasmTrapType::Unreachable => RuntimeError::User {
|
WasmTrapType::Unreachable => RuntimeError::Trap {
|
||||||
msg: "unreachable".into(),
|
msg: "unreachable".into(),
|
||||||
},
|
},
|
||||||
WasmTrapType::IncorrectCallIndirectSignature => {
|
WasmTrapType::IncorrectCallIndirectSignature => RuntimeError::Trap {
|
||||||
RuntimeError::IndirectCallSignature {
|
msg: "uncorrect call_indirect signature".into(),
|
||||||
table: TableIndex::new(0),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
WasmTrapType::MemoryOutOfBounds => RuntimeError::OutOfBoundsAccess {
|
|
||||||
memory: MemoryIndex::new(0),
|
|
||||||
addr: None,
|
|
||||||
},
|
},
|
||||||
WasmTrapType::Unknown => RuntimeError::Unknown {
|
WasmTrapType::MemoryOutOfBounds => RuntimeError::Trap {
|
||||||
msg: "unknown error".into(),
|
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 {
|
impl UserTrapper for Placeholder {
|
||||||
unsafe fn do_early_trap(&self, msg: String) -> ! {
|
unsafe fn do_early_trap(&self, _data: Box<dyn Any>) -> ! {
|
||||||
unimplemented!("do early trap: {}", msg)
|
unimplemented!("do early trap")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user