From d1bc10cfce3f5df91540c0cc6b76d88f09ef8343 Mon Sep 17 00:00:00 2001 From: Robin Freyler Date: Sun, 19 Nov 2023 14:10:17 +0100 Subject: [PATCH] bugfix: clear preservations when resetting register alloc (#787) --- .../wasmi/src/engine/regmach/translator/stack/register_alloc.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/wasmi/src/engine/regmach/translator/stack/register_alloc.rs b/crates/wasmi/src/engine/regmach/translator/stack/register_alloc.rs index 523f8edd73..43679b9a87 100644 --- a/crates/wasmi/src/engine/regmach/translator/stack/register_alloc.rs +++ b/crates/wasmi/src/engine/regmach/translator/stack/register_alloc.rs @@ -119,6 +119,7 @@ impl RegisterAlloc { /// Resets the [`RegisterAlloc`] to start compiling a new function. pub fn reset(&mut self) { + self.preservations.clear(); self.phase = AllocPhase::Init; self.len_locals = 0; self.next_dynamic = 0;