Skip to content

Commit fe6bd2d

Browse files
[mono] Fix crash in common_call_trampoline due to inconsistent rgctx mode (#57677)
* Assume MRGCTX mode if mini_method_is_default_method is true * Fixes #57664 Co-authored-by: Ulrich Weigand <[email protected]>
1 parent ba8967d commit fe6bd2d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/mono/mono/mini/mini-trampolines.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ common_call_trampoline (host_mgreg_t *regs, guint8 *code, MonoMethod *m, MonoVTa
554554
/*
555555
* The caller is gshared code, compute the actual method to call from M and this/rgctx.
556556
*/
557-
if (m->is_inflated && mono_method_get_context (m)->method_inst) {
557+
if (m->is_inflated && (mono_method_get_context (m)->method_inst || mini_method_is_default_method (m))) {
558558
MonoMethodRuntimeGenericContext *mrgctx = (MonoMethodRuntimeGenericContext*)mono_arch_find_static_call_vtable (regs, code);
559559

560560
klass = mrgctx->class_vtable->klass;

0 commit comments

Comments
 (0)