From 6faac1612bf33a5af638f76961684f0e9325e6fb Mon Sep 17 00:00:00 2001 From: Massimiliano Mantione Date: Wed, 8 Aug 2007 09:12:04 +0000 Subject: [PATCH] * class.c (mono_class_setup_vtable_general): Fixed bug #77127, checking that methods with the same fqname are not overridden with a method from an ancestor. svn path=/trunk/mono/; revision=83646 --- mono/metadata/ChangeLog | 6 ++++++ mono/metadata/class.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/mono/metadata/ChangeLog b/mono/metadata/ChangeLog index 660ad249d9151..cbc445e017c15 100644 --- a/mono/metadata/ChangeLog +++ b/mono/metadata/ChangeLog @@ -1,3 +1,9 @@ +2007-08-08 Massimiliano Mantione + + * class.c (mono_class_setup_vtable_general): Fixed bug #77127, + checking that methods with the same fqname are not overridden + with a method from an ancestor. + 2007-08-07 Zoltan Varga * threads.c (free_thread_static_data_helper): Avoid a crash if diff --git a/mono/metadata/class.c b/mono/metadata/class.c index 5951daa6b6c5f..f34142c20cf97 100644 --- a/mono/metadata/class.c +++ b/mono/metadata/class.c @@ -2018,7 +2018,8 @@ mono_class_setup_vtable_general (MonoClass *class, MonoMethod **overrides, int o continue; if (((fqname && !strcmp (cm->name, fqname)) || !strcmp (cm->name, qname)) && - mono_metadata_signature_equal (mono_method_signature (cm), mono_method_signature (im))) { + mono_metadata_signature_equal (mono_method_signature (cm), mono_method_signature (im)) && + ((vtable [io + l] == NULL) || mono_class_is_subclass_of (cm->klass, vtable [io + l]->klass, FALSE))) { /* CAS - SecurityAction.InheritanceDemand on interface */ if (security_enabled && (im->flags & METHOD_ATTRIBUTE_HAS_SECURITY)) {