From 8ed23ae1e47e6319f176b2296ab2c375413e18ff Mon Sep 17 00:00:00 2001 From: Katelyn Gadd Date: Thu, 23 Mar 2023 15:24:17 -0700 Subject: [PATCH] More precise fix for #83792 --- src/mono/mono/mini/interp/transform.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mono/mono/mini/interp/transform.c b/src/mono/mono/mini/interp/transform.c index 18651d62b9d81..895b5cc6bda07 100644 --- a/src/mono/mono/mini/interp/transform.c +++ b/src/mono/mono/mini/interp/transform.c @@ -2875,10 +2875,6 @@ interp_method_check_inlining (TransformData *td, MonoMethod *method, MonoMethodS if (g_list_find (td->dont_inline, method)) return FALSE; - // temp workaround for https://github.com/dotnet/runtime/issues/83792 -kg - if (mono_interp_jit_call_supported(method, csignature)) - return FALSE; - return TRUE; } @@ -3485,6 +3481,9 @@ interp_transform_call (TransformData *td, MonoMethod *method, MonoMethod *target if (td->verbose_level > 1) g_print("Disabling inlining because we have no target_method for call in %s\n", td->method->name); return FALSE; + } else if (td->method->wrapper_type == MONO_WRAPPER_RUNTIME_INVOKE) { + // This scenario causes https://github.com/dotnet/runtime/issues/83792 + return FALSE; } else if (has_doesnotreturn_attribute(target_method)) { /* * Since the method does not return, it's probably a throw helper and will not be called.