[metadata] Handle MONO_TYPE_FNPTR case in collect_type_images (#34517)
authormonojenkins <jo.shields+jenkins@xamarin.com>
Wed, 8 Apr 2020 23:22:59 +0000 (19:22 -0400)
committerGitHub <noreply@github.com>
Wed, 8 Apr 2020 23:22:59 +0000 (01:22 +0200)
Fixes abort when PTR-FNPTR field signature is encountered.

I do not have a deep understanding of how the code in this area works,
but I have called the function that appears most consistent with how
other signatures are being handled.

Fixes mono/mono#12098
Fixes mono/mono#17113
Fixes mono/mono#19433

Co-authored-by: whydoubt <whydoubt@users.noreply.github.com>
src/mono/mono/metadata/metadata.c

index 5734b9f..6b659fc 100644 (file)
@@ -3054,8 +3054,8 @@ retry:
                type = m_class_get_byval_arg (type->data.array->eklass);
                goto retry;
        case MONO_TYPE_FNPTR:
-               //return signature_in_image (type->data.method, image);
-               g_assert_not_reached ();
+               collect_signature_images (type->data.method, data);
+               break;
        case MONO_TYPE_VAR:
        case MONO_TYPE_MVAR:
        {