From cbdbd81b1f0c273979a9a74df24fd74123bb1751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksey=20Kliger=20=28=CE=BBgeek=29?= Date: Mon, 13 Aug 2018 10:23:39 -0400 Subject: [PATCH] [mini] Don't assert on MONO_PATCH_INFO_GC_SAFE_POINT_FLAG if coop is disabled (mono/mono#9974) If an AOT library is loaded that was compiled with safepoints, but currently we're running with preemptive suspend (e.g. MONO_THREADS_SUSPEND=preemptive is set), don't assert. `mono_polling_required` will always be false, so the safepoint will be ignored. Fixes https://github.com/mono/mono/issues/9947 Commit migrated from https://github.com/mono/mono/commit/d36902effdcb02d93b14943ce3ceaf1bcf11619a --- src/mono/mono/mini/mini-runtime.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mono/mono/mini/mini-runtime.c b/src/mono/mono/mini/mini-runtime.c index bef7e1734bdc..42578e26ebff 100644 --- a/src/mono/mono/mini/mini-runtime.c +++ b/src/mono/mono/mini/mini-runtime.c @@ -1405,7 +1405,6 @@ mono_resolve_patch_target (MonoMethod *method, MonoDomain *domain, guint8 *code, break; } case MONO_PATCH_INFO_GC_SAFE_POINT_FLAG: - g_assert (mono_threads_are_safepoints_enabled ()); target = (gpointer)&mono_polling_required; break; case MONO_PATCH_INFO_SWITCH: {