2006-08-31 Zoltan Varga <vargaz@gmail.com>
+ * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
+ with cycles in classes.
+
* icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
* marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
layout = klass->flags & TYPE_ATTRIBUTE_LAYOUT_MASK;
- info = g_malloc0 (sizeof (MonoMarshalType) + sizeof (MonoMarshalField) * count);
+ klass->marshal_info = info = g_malloc0 (sizeof (MonoMarshalType) + sizeof (MonoMarshalField) * count);
info->num_fields = count;
/* Try to find a size for this type in metadata */
if (info->native_size != mono_class_value_size (klass, NULL))
klass->blittable = FALSE;
- mono_loader_lock ();
- if (klass->marshal_info)
- /* Another thread already initialized it */
- g_free (info);
- else
- klass->marshal_info = info;
- mono_loader_unlock ();
-
/* If this is an array type, ensure that we have element info */
if (klass->element_class) {
mono_marshal_load_type_info (klass->element_class);