From a8d10611acb0cd9488487d87f7863a44d4f32275 Mon Sep 17 00:00:00 2001 From: Alexander Kyte Date: Thu, 13 Dec 2018 15:02:49 -0500 Subject: [PATCH] [runtime] Fix aot mode double init check --- mono/mini/driver.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mono/mini/driver.c b/mono/mini/driver.c index 83032391e5d..866481abb7c 100644 --- a/mono/mini/driver.c +++ b/mono/mini/driver.c @@ -2789,11 +2789,13 @@ void mono_jit_set_aot_mode (MonoAotMode mode) { /* we don't want to set mono_aot_mode twice */ - g_assert (mono_aot_mode == MONO_AOT_MODE_NONE); + static gboolean inited; + + g_assert (!inited); mono_aot_mode = mode; + inited = TRUE; mono_runtime_set_execution_mode ((MonoEEMode)mode); - } mono_bool -- 2.11.4.GIT