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())