(&self, errors: &mut VerifierErrors)
| 2094 | } |
| 2095 | |
| 2096 | fn verify_signatures(&self, errors: &mut VerifierErrors) -> VerifierStepResult { |
| 2097 | // Verify this function's own signature. |
| 2098 | self.verify_signature(&self.func.signature, AnyEntity::Function, errors)?; |
| 2099 | // Verify signatures referenced by any extfunc, using that |
| 2100 | // extfunc as the entity to which to attach the error. |
| 2101 | for (func, funcdata) in &self.func.dfg.ext_funcs { |
| 2102 | // Non-contiguous func entities result in placeholders |
| 2103 | // with invalid signatures; skip them. |
| 2104 | if !funcdata.signature.is_reserved_value() { |
| 2105 | self.verify_signature(&self.func.dfg.signatures[funcdata.signature], func, errors)?; |
| 2106 | } |
| 2107 | } |
| 2108 | // Verify all signatures, including those only used by |
| 2109 | // e.g. indirect calls. Technically this re-verifies |
| 2110 | // signatures verified above but we want the first pass to |
| 2111 | // attach errors to funcrefs and we also need to verify all |
| 2112 | // defined signatures. |
| 2113 | for (sig, sigdata) in &self.func.dfg.signatures { |
| 2114 | self.verify_signature(sigdata, sig, errors)?; |
| 2115 | } |
| 2116 | Ok(()) |
| 2117 | } |
| 2118 | |
| 2119 | pub fn run(&self, errors: &mut VerifierErrors) -> VerifierStepResult { |
| 2120 | self.verify_global_values(errors)?; |
no test coverage detected