[jit] Fix an assertion in the Thread.VolatileRead () intrinsic. (mono/mono#18430)
authorZoltan Varga <vargaz@gmail.com>
Mon, 13 Jan 2020 11:09:09 +0000 (12:09 +0100)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Mon, 13 Jan 2020 11:09:09 +0000 (12:09 +0100)
Fixes https://github.com/mono/mono/issues/18418.

Commit migrated from https://github.com/mono/mono/commit/4b718ca1f2547172e3bb68e9b87f1bde11429528

src/mono/mono/mini/intrinsics.c

index b3de056..84cdd43 100644 (file)
@@ -1044,7 +1044,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                                        ins->type = STACK_R8;
                                        break;
                                default:
-                                       g_assert (mini_type_is_reference (fsig->params [0]));
+                                       g_assert (is_ref);
                                        ins->dreg = mono_alloc_ireg_ref (cfg);
                                        ins->type = STACK_OBJ;
                                        break;