Skip to content

Commit

Permalink
Check if a method is dynamic when transforming internal calls
Browse files Browse the repository at this point in the history
Fixes dotnet/runtime#38897 , by allowing transforming internal calls when method is dynamic.
  • Loading branch information
fanyang-mono committed Aug 3, 2020
1 parent d09e9e2 commit 102b373
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mono/mini/interp/transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -1904,7 +1904,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)
Expand Down

0 comments on commit 102b373

Please sign in to comment.