[Mono-bugs] [Bug 558124] [verifier] SIGSEGV in inflate_generic_type on a bad assembly

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Nov 24 14:56:17 EST 2009


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

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


--- Comment #1 from Sebastien Pouliot <spouliot at novell.com> 2009-11-24 19:56:13 UTC ---
I'm using this local patch (fixing the first two instances in
inflate_generic_type and asserting on the third) to continue fuzzing on other
cases.

Index: mono/metadata/class.c
===================================================================
--- mono/metadata/class.c    (revision 146856)
+++ mono/metadata/class.c    (working copy)
@@ -505,8 +505,9 @@
         if (!inst || !inst->type_argv)
             return NULL;
         if (num >= inst->type_argc) {
+            char *name = image ? image->module_name : "<no-image>";
             MonoGenericParamInfo *info = mono_generic_param_info
(type->data.generic_param);
-            mono_error_set_bad_image (error, image->module_name, "MVAR %d (%s)
cannot be expanded in this context with %d instantiations",
+            mono_error_set_bad_image (error, name, "MVAR %d (%s) cannot be
expanded in this context with %d instantiations",
                 num, info ? info->name : "", inst->type_argc);
             return NULL;
         }
@@ -528,8 +529,9 @@
         if (!inst)
             return NULL;
         if (num >= inst->type_argc) {
+            char *name = image ? image->module_name : "<no-image>";
             MonoGenericParamInfo *info = mono_generic_param_info
(type->data.generic_param);
-            mono_error_set_bad_image (error, image->module_name, "VAR %d (%s)
cannot be expanded in this context with %d instantiations",
+            mono_error_set_bad_image (error, name, "VAR %d (%s) cannot be
expanded in this context with %d instantiations",
                 num, info ? info->name : "", inst->type_argc);
             return NULL;
         }
@@ -593,6 +595,7 @@
         if (inst == container->context.class_inst)
             return NULL;

+        g_assert (klass->image);
         gclass = mono_metadata_lookup_generic_class (klass, inst,
klass->image->dynamic);

         nt = mono_metadata_type_dup (image, type);

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