Catch panics on the FFI boundary between the runtime and the host for wasmtime (#11189)

* Catch panics on the FFI boundary between the runtime and the host for `wasmtime`

* Use an already existing test runtime function

* Merge the tests together
This commit is contained in:
Koute authored and GitHub committed 2022-04-08 11:26:47 +00:00
1 parent 2a5c11e2cc
commit 1411e028aa
3 files changed
+39 -10

No files matched your search

@@ -113,7 +113,9 @@ sp_core::wasm_export_functions! {
}
}
fn test_exhaust_heap() -> Vec<u8> { Vec::with_capacity(16777216) }
fn test_allocate_vec(size: u32) -> Vec<u8> {
Vec::with_capacity(size as usize)
}
fn test_fp_f32add(a: [u8; 4], b: [u8; 4]) -> [u8; 4] {
let a = f32::from_le_bytes(a);