From 5ebc83bff1424e96c0ffc961074ce8e50aa47425 Mon Sep 17 00:00:00 2001 From: Robin Freyler Date: Tue, 23 Jan 2024 19:36:03 +0100 Subject: [PATCH] fix InstanceCache bug --- crates/wasmi/src/engine/cache.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/wasmi/src/engine/cache.rs b/crates/wasmi/src/engine/cache.rs index 06facfae94..af48e9d70e 100644 --- a/crates/wasmi/src/engine/cache.rs +++ b/crates/wasmi/src/engine/cache.rs @@ -200,7 +200,7 @@ impl InstanceCache { fn load_default_memory_bytes(&mut self, ctx: &mut StoreInner) -> &mut NonNull<[u8]> { let memory = *self.default_memory(ctx); self.default_memory_bytes - .insert(ctx.resolve_memory_mut(&memory).data().into()) + .insert(ctx.resolve_memory_mut(&memory).data_mut().into()) } /// Clears the cached default memory instance.