[Mono-bugs] [Bug 569542] [verifier] SIGSEGV in find_method_in_class on a bad assembly

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Jan 10 16:54:28 EST 2010


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

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


--- Comment #1 from Sebastien Pouliot <spouliot at novell.com> 2010-01-10 21:54:25 UTC ---
It's likely you will hit the problem earlier since I already have a local path
(first part below) against some NULL cases (see bug #561728). The second part
(also below) "fix" this SIGSEGV.

Index: mono/metadata/loader.c
===================================================================
--- mono/metadata/loader.c    (revision 149285)
+++ mono/metadata/loader.c    (working copy)
@@ -597,8 +597,10 @@
                 continue;

             method = mono_get_method (klass->image, MONO_TOKEN_METHOD_DEF |
(klass->method.first + i + 1), klass);
+            if (!method)
+                continue;
             other_sig = mono_method_signature (method);
-            if (method && other_sig && (sig->call_convention !=
MONO_CALL_VARARG) && mono_metadata_signature_equal (sig, other_sig))
+            if (other_sig && (sig->call_convention != MONO_CALL_VARARG) &&
mono_metadata_signature_equal (sig, other_sig))
                 return method;
         }
     }
@@ -615,6 +617,9 @@
         MonoMethod *m = klass->methods [i];
         MonoMethodSignature *msig;

+        if (!m)
+            continue;
+
         if (!((fqname && !strcmp (m->name, fqname)) ||
               (qname && !strcmp (m->name, qname)) ||
               (name && !strcmp (m->name, name))))

-- 
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