Skip to content

Commit

Permalink
add clarifying comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbepop committed Oct 11, 2024
1 parent cd8352f commit 880f917
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/wasmi/src/engine/translator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

Check warning on line 588 in crates/wasmi/src/engine/translator/mod.rs

View check run for this annotation

Codecov / codecov/patch

crates/wasmi/src/engine/translator/mod.rs#L588

Added line #L588 was not covered by tests
}
Ok(self.into_allocations())
Expand Down

0 comments on commit 880f917

Please sign in to comment.