[Mono-bugs] [Bug 76717][Min] Changed - alignmnet of reference fields

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Nov 21 10:58:35 EST 2005

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by lupus at ximian.com.


--- shadow/76717	2005-11-16 09:20:55.000000000 -0500
+++ shadow/76717.tmp.26168	2005-11-21 10:58:35.000000000 -0500
@@ -1,23 +1,23 @@
 Bug#: 76717
 Product: Mono: Runtime
 Version: 1.1
 OS: unknown
 OS Details: RHEL4
-Status: RESOLVED   
-Resolution: FIXED
+Status: REOPENED   
 Severity: Unknown
 Priority: Minor
-Component: interop
+Component: misc
 AssignedTo: mono-bugs at ximian.com                            
 ReportedBy: billmedland at mercuryspeed.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
-Summary: Marshal.SizeOf asserts on a packed struct
+Summary: alignmnet of reference fields
 Please fill in this template when reporting a bug, unless you know what you
 are doing.
 Description of Problem:
 Marshal.SizeOf cannot handle packed structures
@@ -43,6 +43,19 @@
 Test case for Marshal.SizeOf assertion failure
 ------- Additional Comments From vargaz at gmail.com  2005-11-16 09:20 -------
 Fixed in SVN.
+------- Additional Comments From lupus at ximian.com  2005-11-21 10:58 -------
+Reopening the bug.
+The committed fix is wrong: we should never allow reference fields to
+be set at non-pointer aligned offsets. If we do, the GC will not see
+the object, it will reclaim it and everything breaks.
+For the specific case we should either ignore the pack constraint when
+aligning fields with references if it's not big enough (and obey it
+only in the unmanaged layout of the struct, because that one doesn't
+have reference fields), or we should refuse to load the type and
+generate a TypeLoad or similar exception. Do you mind checking what
+the MS runtime does in this case?

More information about the mono-bugs mailing list