Skip to content
Browse files

Fix a crash in the soft-float decompose code when a branch following …

…an fcompare is optimized away. Fixes #705186.
  • Loading branch information...
1 parent ec866ff commit 769f316c4995b0085007d1c6131cf9571b4b1a1c @vargaz vargaz committed
Showing with 11 additions and 1 deletion.
  1. +11 −1 mono/mini/method-to-ir.c
View
12 mono/mini/method-to-ir.c
@@ -5219,8 +5219,18 @@ mono_decompose_soft_float (MonoCompile *cfg)
/* Convert fcompare+fbcc to icall+icompare+beq */
+ if (!ins->next) {
+ /* The branch might be optimized away */
+ NULLIFY_INS (ins);
+ break;
+ }
+
info = mono_find_jit_opcode_emulation (ins->next->opcode);
- g_assert (info);
+ if (!info) {
+ /* The branch might be optimized away */
+ NULLIFY_INS (ins);
+ break;
+ }
/* Create dummy MonoInst's for the arguments */
MONO_INST_NEW (cfg, iargs [0], OP_ARG);

0 comments on commit 769f316

Please sign in to comment.
Something went wrong with that request. Please try again.