+2010-04-25 Zoltan Varga <vargaz@gmail.com>
+
+ * class.c (mono_class_create_from_typedef): Initialize class->nested_in after
+ calling setup_mono_type () since the nested parent could recursively reference
+ the nested class using generic constraints. Fixes #599469.
+
2010-04-24 Mark Probst <mark.probst@gmail.com>
* sgen-gc.c, sgen-pinning.c, sgen-major-copying.c: Major collector
}
}
- /* do this early so it's available for interfaces in setup_mono_type () */
+ mono_class_setup_parent (class, parent);
+
+ /* uses ->valuetype, which is initialized by mono_class_setup_parent above */
+ mono_class_setup_mono_type (class);
+
+ /*
+ * This might access class->byval_arg for recursion generated by generic constraints,
+ * so it has to come after setup_mono_type ().
+ */
if ((nesting_tokeen = mono_metadata_nested_in_typedef (image, type_token))) {
class->nested_in = mono_class_create_from_typedef (image, nesting_tokeen);
if (!class->nested_in) {
}
}
- mono_class_setup_parent (class, parent);
-
- /* uses ->valuetype, which is initialized by mono_class_setup_parent above */
- mono_class_setup_mono_type (class);
-
if ((class->flags & TYPE_ATTRIBUTE_STRING_FORMAT_MASK) == TYPE_ATTRIBUTE_UNICODE_CLASS)
class->unicode = 1;