Skip to content

Commit

Permalink
[mono][jit] Fix a JIT assert. (#59869)
Browse files Browse the repository at this point in the history
Backport of #59861

Fixes #57560.
  • Loading branch information
github-actions[bot] committed Oct 6, 2021
1 parent 9630d45 commit e9b59ad
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/mono/mono/mini/method-to-ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -7326,9 +7326,12 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
ERROR_DECL (error);

MonoMethod *new_cmethod = mono_class_get_virtual_method (sp [0]->klass, cmethod, error);
mono_error_assert_ok (error);
cmethod = new_cmethod;
virtual_ = FALSE;
if (is_ok (error)) {
cmethod = new_cmethod;
virtual_ = FALSE;
} else {
mono_error_cleanup (error);
}
}

if (cmethod && method_does_not_return (cmethod)) {
Expand Down

0 comments on commit e9b59ad

Please sign in to comment.