2009-12-17 Rodrigo Kumpera <rkumpera@novell.com>
authorRodrigo Kumpera <kumpera@gmail.com>
Thu, 17 Dec 2009 12:06:42 +0000 (12:06 -0000)
committerRodrigo Kumpera <kumpera@gmail.com>
Thu, 17 Dec 2009 12:06:42 +0000 (12:06 -0000)
* icall.c (ves_icall_Type_GetMethodsByName): Don't pin virtual methods if they are newslot.
A private virtual newslot method is used to implement an interface method without exposing
it to users. When querying for public instance methods, such method would hide a public one
on a parent type.

Fixes #564379.

svn path=/trunk/mono/; revision=148694

mono/metadata/ChangeLog
mono/metadata/icall.c

index 3cb2d2f8b2665498444ce05941540243b3ddbdf7..e7a07d797870920eb5d24ac9b18fb2c26897c121 100644 (file)
@@ -1,3 +1,12 @@
+2009-12-17  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * icall.c (ves_icall_Type_GetMethodsByName): Don't pin virtual methods if they are newslot.
+       A private virtual newslot method is used to implement an interface method without exposing
+       it to users. When querying for public instance methods, such method would hide a public one
+       on a parent type.
+
+       Fixes #564379.
+
 2009-12-17  Zoltan Varga  <vargaz@gmail.com>
 
        * reflection.c (resolve_object): Fix the encoding of unmanaged calling
index 20e4ebb4ff0c51a7bf6899d5350010f065f15166..8ef377a903f8dbfd89b06ae03dfaff922e2f44d0 100644 (file)
@@ -3473,7 +3473,8 @@ handle_parent:
                        g_assert (method->slot < nslots);
                        if (method_slots [method->slot >> 5] & (1 << (method->slot & 0x1f)))
                                continue;
-                       method_slots [method->slot >> 5] |= 1 << (method->slot & 0x1f);
+                       if (!(method->flags & METHOD_ATTRIBUTE_NEW_SLOT))
+                               method_slots [method->slot >> 5] |= 1 << (method->slot & 0x1f);
                }
 
                if (method->name [0] == '.' && (strcmp (method->name, ".ctor") == 0 || strcmp (method->name, ".cctor") == 0))