From 77a0bc7ace0ed6cbc01e7c0bbb1ea4a633e39b79 Mon Sep 17 00:00:00 2001 From: Arseniy Lyashenko Date: Mon, 17 Jul 2023 16:03:56 +0300 Subject: [PATCH] Update WASMI branch --- Cargo.lock | 6 +++--- sandbox/host/src/sandbox.rs | 2 +- sandbox/host/src/sandbox/wasmi_backend.rs | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0761ff3e2e2..38392b6231a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13813,7 +13813,7 @@ dependencies = [ [[package]] name = "wasmi" version = "0.30.0" -source = "git+https://github.com/gear-tech/wasmi?branch=al-modify-globals#15274281b5ddcf555c1ad82af7f8f16fbc5d0a2c" +source = "git+https://github.com/gear-tech/wasmi?branch=al-modify-globals#b9fa6e0cbb0e9af46c601d4b7e74a8791f9f18a1" dependencies = [ "intx", "smallvec", @@ -13834,7 +13834,7 @@ dependencies = [ [[package]] name = "wasmi_arena" version = "0.4.0" -source = "git+https://github.com/gear-tech/wasmi?branch=al-modify-globals#15274281b5ddcf555c1ad82af7f8f16fbc5d0a2c" +source = "git+https://github.com/gear-tech/wasmi?branch=al-modify-globals#b9fa6e0cbb0e9af46c601d4b7e74a8791f9f18a1" [[package]] name = "wasmi_core" @@ -13866,7 +13866,7 @@ dependencies = [ [[package]] name = "wasmi_core" version = "0.12.0" -source = "git+https://github.com/gear-tech/wasmi?branch=al-modify-globals#15274281b5ddcf555c1ad82af7f8f16fbc5d0a2c" +source = "git+https://github.com/gear-tech/wasmi?branch=al-modify-globals#b9fa6e0cbb0e9af46c601d4b7e74a8791f9f18a1" dependencies = [ "downcast-rs", "libm 0.2.6", diff --git a/sandbox/host/src/sandbox.rs b/sandbox/host/src/sandbox.rs index 38aefa79ceb..8c6fb19d93d 100644 --- a/sandbox/host/src/sandbox.rs +++ b/sandbox/host/src/sandbox.rs @@ -253,7 +253,7 @@ impl SandboxInstance { match &self.backend_instance { BackendInstance::Wasmi { exports, globals, .. - } => wasmi_set_global(exports, globals.clone(), name, value), + } => wasmi_set_global(exports, globals, name, value), #[cfg(feature = "host-sandbox")] BackendInstance::Wasmer(wasmer_instance) => { diff --git a/sandbox/host/src/sandbox/wasmi_backend.rs b/sandbox/host/src/sandbox/wasmi_backend.rs index 4db81b6d155..13036fc648f 100644 --- a/sandbox/host/src/sandbox/wasmi_backend.rs +++ b/sandbox/host/src/sandbox/wasmi_backend.rs @@ -44,6 +44,7 @@ thread_local! { static WASMI_CALLER: RefCell>> = RefCell::new(None); } +#[must_use] struct WasmiCallerSetter(()); impl WasmiCallerSetter { @@ -481,7 +482,7 @@ pub fn get_global(exports: &Exports, globals: &Globals, name: &str) -> Option std::result::Result, error::Error> {