From 8c7bacbd0431f7f6f26d0dd3efbc2f6b06d58ea8 Mon Sep 17 00:00:00 2001 From: Fan Yang Date: Mon, 3 Aug 2020 09:30:08 -0400 Subject: [PATCH] Check if a method is dynamic when transforming internal calls --- src/mono/mono/mini/interp/transform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/mono/mini/interp/transform.c b/src/mono/mono/mini/interp/transform.c index f0a333d04dcf7..73acac112ba26 100644 --- a/src/mono/mono/mini/interp/transform.c +++ b/src/mono/mono/mini/interp/transform.c @@ -1901,7 +1901,7 @@ interp_handle_intrinsics (TransformData *td, MonoMethod *target_method, MonoClas static MonoMethod* interp_transform_internal_calls (MonoMethod *method, MonoMethod *target_method, MonoMethodSignature *csignature, gboolean is_virtual) { - if (method->wrapper_type == MONO_WRAPPER_NONE && target_method != NULL) { + if (((method->wrapper_type == MONO_WRAPPER_NONE) || (method->wrapper_type == MONO_WRAPPER_DYNAMIC_METHOD)) && target_method != NULL) { if (target_method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL) target_method = mono_marshal_get_native_wrapper (target_method, FALSE, FALSE); if (!is_virtual && target_method->iflags & METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED)