From 880f917b7166f8ec36c67174e3b2f0233f01fde1 Mon Sep 17 00:00:00 2001 From: Robin Freyler Date: Tue, 8 Oct 2024 16:53:57 +0200 Subject: [PATCH] add clarifying comment --- crates/wasmi/src/engine/translator/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/wasmi/src/engine/translator/mod.rs b/crates/wasmi/src/engine/translator/mod.rs index 747d4725e9..6e444fd176 100644 --- a/crates/wasmi/src/engine/translator/mod.rs +++ b/crates/wasmi/src/engine/translator/mod.rs @@ -582,6 +582,9 @@ impl WasmTranslator<'_> for FuncTranslator { finalize(CompiledFuncEntity::new(len_registers, instrs, func_consts)); #[cfg(debug_assertions)] if let Err(err) = conditions::verify_translation_invariants(&self) { + // Note: we do not propagate these errors to the caller as usual since + // breaking Wasmi translation invariants is considered a bug in Wasmi itself + // that should never occur if Wasmi translation works as intended. panic!("{err}") } Ok(self.into_allocations())