From b4f4acc1331a681696e99f4a54231b38c42b4fc2 Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Fri, 22 Mar 2019 11:02:15 -0400 Subject: [PATCH] [aot] Avoid an assert which can happen in normal usage. (#13581) Fixes https://github.com/mono/mono/issues/13455. --- mono/mini/aot-compiler.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mono/mini/aot-compiler.c b/mono/mini/aot-compiler.c index e5627cfa649..5c8f2e9d9ec 100644 --- a/mono/mini/aot-compiler.c +++ b/mono/mini/aot-compiler.c @@ -4123,7 +4123,9 @@ add_extra_method_with_depth (MonoAotCompile *acfg, MonoMethod *method, int depth if (mono_method_is_generic_sharable_full (method, TRUE, TRUE, FALSE)) { method = mini_get_shared_method_full (method, SHARE_MODE_NONE, error); - mono_error_assert_ok (error); + if (!is_ok (error)) + /* vtype constraint */ + return; } else if ((acfg->opts & MONO_OPT_GSHAREDVT) && prefer_gsharedvt_method (acfg, method) && mono_method_is_generic_sharable_full (method, FALSE, FALSE, TRUE)) { /* Use the gsharedvt version */ method = mini_get_shared_method_full (method, SHARE_MODE_GSHAREDVT, error); -- 2.11.4.GIT