[Mono-bugs] [Bug 564897] [verifier] abort in mono_method_get_signature_full (2) on bad assembly

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Dec 18 15:18:13 EST 2009


http://bugzilla.novell.com/show_bug.cgi?id=564897

http://bugzilla.novell.com/show_bug.cgi?id=564897#c1


Sebastien Pouliot <spouliot at novell.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[verifier] abort            |[verifier] abort in
                   |inmono_method_get_signature |mono_method_get_signature_f
                   |_full (2) on bad assembly   |ull (2) on bad assembly

--- Comment #1 from Sebastien Pouliot <spouliot at novell.com> 2009-12-18 20:18:11 UTC ---
Since the callers to mono_method_get_signature_full already needs to handle a
NULL return value and since the verifier also throws an error on a NULL value
then the asserts (this one and the one from bug #560334) don't look required
anymore.

This patch would fix both issues.

Index: mono/metadata/loader.c
===================================================================
--- mono/metadata/loader.c    (revision 148750)
+++ mono/metadata/loader.c    (working copy)
@@ -772,10 +774,9 @@
         return mono_method_signature (method);

     if (table == MONO_TABLE_METHODSPEC) {
-        g_assert (!(method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL) &&
-              mono_method_signature (method));
-        g_assert (method->is_inflated);
-
+        /* the verifier (do_invoke_method) will turn the NULL into a verifier
error */
+        if ((method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL) ||
!method->is_inflated)
+            return NULL;
         return mono_method_signature (method);
     }

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list