MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / verify_exception_table

Method verify_exception_table

cranelift/codegen/src/verifier/mod.rs:898–925  ·  view source on GitHub ↗
(
        &self,
        inst: Inst,
        et: ExceptionTable,
        errors: &mut VerifierErrors,
    )

Source from the content-addressed store, hash-verified

896 }
897
898 fn verify_exception_table(
899 &self,
900 inst: Inst,
901 et: ExceptionTable,
902 errors: &mut VerifierErrors,
903 ) -> VerifierStepResult {
904 // Verify that the exception table reference itself is valid.
905 if !self.func.stencil.dfg.exception_tables.is_valid(et) {
906 errors.nonfatal((
907 inst,
908 self.context(inst),
909 format!("invalid exception table reference {et}"),
910 ))?;
911 }
912
913 let pool = &self.func.stencil.dfg.value_lists;
914 let exdata = &self.func.stencil.dfg.exception_tables[et];
915
916 // Verify that the exception table's signature reference
917 // is valid.
918 self.verify_sig_ref(inst, exdata.signature(), errors)?;
919
920 // Verify that the exception table's block references are valid.
921 for block in exdata.all_branches() {
922 self.verify_block(inst, block.block(pool), errors)?;
923 }
924 Ok(())
925 }
926
927 fn verify_exception_compatible_abi(
928 &self,

Callers 1

Calls 9

OkFunction · 0.85
nonfatalMethod · 0.80
verify_sig_refMethod · 0.80
verify_blockMethod · 0.80
is_validMethod · 0.45
contextMethod · 0.45
signatureMethod · 0.45
all_branchesMethod · 0.45
blockMethod · 0.45

Tested by

no test coverage detected