Skip to content

Commit 7e71e85

Browse files
committed
Propertly handle the layout of generic valuetypes. This is a fix similar to 2a899eb (case 930358)
1 parent 5ab33f4 commit 7e71e85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mono/metadata/class.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1602,7 +1602,7 @@ mono_class_layout_fields (MonoClass *class)
16021602
/* corlib is missing [StructLayout] directives in many places */
16031603
if (layout == TYPE_ATTRIBUTE_AUTO_LAYOUT) {
16041604
if (class->image != mono_defaults.corlib &&
1605-
class->byval_arg.type != MONO_TYPE_VALUETYPE)
1605+
!class->valuetype)
16061606
gc_aware_layout = TRUE;
16071607
/* from System.dll, used in metadata/process.h */
16081608
if (strcmp (class->name, "ProcessStartInfo") == 0)

0 commit comments

Comments
 (0)