Skip to content

Commit 4def31a

Browse files
vargazgithub-actions
authored andcommitted
[mono][jit] Fix a JIT assert.
Fixes #57560.
1 parent 6c5c32d commit 4def31a

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎src/mono/mono/mini/method-to-ir.c‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7326,9 +7326,12 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
73267326
ERROR_DECL (error);
73277327

73287328
MonoMethod *new_cmethod = mono_class_get_virtual_method (sp [0]->klass, cmethod, error);
7329-
mono_error_assert_ok (error);
7330-
cmethod = new_cmethod;
7331-
virtual_ = FALSE;
7329+
if (is_ok (error)) {
7330+
cmethod = new_cmethod;
7331+
virtual_ = FALSE;
7332+
} else {
7333+
mono_error_cleanup (error);
7334+
}
73327335
}
73337336

73347337
if (cmethod && method_does_not_return (cmethod)) {

0 commit comments

Comments
 (0)