Skip to content

Commit

Permalink
[mono] Avoid a JIT assert. (#58071)
Browse files Browse the repository at this point in the history
Workaround for #57560.
  • Loading branch information
vargaz authored Aug 25, 2021
1 parent 3633a7d commit 8455a5e
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/mono/mono/mini/method-to-ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -5322,20 +5322,20 @@ handle_call_res_devirt (MonoCompile *cfg, MonoMethod *cmethod, MonoInst *call_re
MonoClass *gcomparer = mono_class_get_geqcomparer_class ();
g_assert (gcomparer);
gcomparer_inst = mono_class_inflate_generic_class_checked (gcomparer, &ctx, error);
mono_error_assert_ok (error);
if (is_ok (error)) {
MONO_INST_NEW (cfg, typed_objref, OP_TYPED_OBJREF);
typed_objref->type = STACK_OBJ;
typed_objref->dreg = alloc_ireg_ref (cfg);
typed_objref->sreg1 = call_res->dreg;
typed_objref->klass = gcomparer_inst;
MONO_ADD_INS (cfg->cbb, typed_objref);

MONO_INST_NEW (cfg, typed_objref, OP_TYPED_OBJREF);
typed_objref->type = STACK_OBJ;
typed_objref->dreg = alloc_ireg_ref (cfg);
typed_objref->sreg1 = call_res->dreg;
typed_objref->klass = gcomparer_inst;
MONO_ADD_INS (cfg->cbb, typed_objref);
call_res = typed_objref;

call_res = typed_objref;

/* Force decompose */
cfg->flags |= MONO_CFG_NEEDS_DECOMPOSE;
cfg->cbb->needs_decompose = TRUE;
/* Force decompose */
cfg->flags |= MONO_CFG_NEEDS_DECOMPOSE;
cfg->cbb->needs_decompose = TRUE;
}
}
}

Expand Down

0 comments on commit 8455a5e

Please sign in to comment.