[Mono-bugs] [Bug 77230][Nor] Changed - Marshalling C unions not
working anymore
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Jan 19 10:22:06 EST 2006
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 kornelpal at hotmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=77230
--- shadow/77230 2006-01-19 10:07:58.000000000 -0500
+++ shadow/77230.tmp.31822 2006-01-19 10:22:06.000000000 -0500
@@ -1,13 +1,13 @@
Bug#: 77230
Product: Mono: Runtime
Version: 1.1
OS: unknown
OS Details:
-Status: RESOLVED
-Resolution: FIXED
+Status: REOPENED
+Resolution:
Severity: Unknown
Priority: Normal
Component: interop
AssignedTo: mono-bugs at ximian.com
ReportedBy: maurits.rijk at philips.com
QAContact: mono-bugs at ximian.com
@@ -185,6 +185,30 @@
------- Additional Comments From kornelpal at hotmail.com 2006-01-19 10:07 -------
Created an attachment (id=16373)
ExplicitLayoutTest2.cs
+
+------- Additional Comments From kornelpal at hotmail.com 2006-01-19 10:22 -------
+I've done some more research:
+
+ExplicitLayoutTest2.cs results on MS.NET:
+0
+
+Unhandled Exception: System.TypeLoadException: Could not load type
+InvalidExplicitLayout from assembly ExplicitLayoutTest,
+Version=0.0.0.0, Culture=neutral, PublicKeyToken=null because it
+contains an object field at offset 0 that is incorrectly aligned or
+overlapped by a non-object field.
+ at ExplicitLayoutTest.ExplicitLayoutTest.DoInvalid()
+ at ExplicitLayoutTest.ExplicitLayoutTest.Main(String[] args)
+
+Reference fields are supported by LayoutKind.Explicit as long as
+they are correctly aligned and don't overlap with non-object fields.
+This means that two reference fields can have the same offset. Note
+that this is even more relaxed than the current Mono implementation.
+
+This makes LayoutKind.Explicit behavior quite unpredictable because
+it can have different behavior on each platform because of different
+pointer size or alignment but it already has different behavior on
+little and big-endian systems for example.
More information about the mono-bugs
mailing list