Skip to content

Commit

Permalink
[mono] Fix crash in common_call_trampoline due to inconsistent rgctx …
Browse files Browse the repository at this point in the history
…mode (#57677)

* Assume MRGCTX mode if mini_method_is_default_method is true

* Fixes #57664

Co-authored-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
  • Loading branch information
github-actions[bot] and uweigand committed Aug 19, 2021
1 parent ba8967d commit fe6bd2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mono/mono/mini/mini-trampolines.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ common_call_trampoline (host_mgreg_t *regs, guint8 *code, MonoMethod *m, MonoVTa
/*
* The caller is gshared code, compute the actual method to call from M and this/rgctx.
*/
if (m->is_inflated && mono_method_get_context (m)->method_inst) {
if (m->is_inflated && (mono_method_get_context (m)->method_inst || mini_method_is_default_method (m))) {
MonoMethodRuntimeGenericContext *mrgctx = (MonoMethodRuntimeGenericContext*)mono_arch_find_static_call_vtable (regs, code);

klass = mrgctx->class_vtable->klass;
Expand Down

0 comments on commit fe6bd2d

Please sign in to comment.