[Mono-bugs] [Bug 61860][Nor] New - Regresssion: pack-layout.exe failing

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 22 Jul 2004 18:33:20 -0400 (EDT)


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 duncan@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=61860

--- shadow/61860	2004-07-22 18:33:20.000000000 -0400
+++ shadow/61860.tmp.11499	2004-07-22 18:33:20.000000000 -0400
@@ -0,0 +1,59 @@
+Bug#: 61860
+Product: Mono: Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: duncan@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Regresssion: pack-layout.exe failing
+
+The pack-layput.exe test has been failing.
+
+If I revert this patch,
+http://lists.ximian.com/archives/public/mono-patches/2004-July/043501.html,
+the test passes again.
+
+The problem stems from this:
+
+Given:
+
+using System.Runtime.InteropServices;
+[StructLayout (LayoutKind.Sequential, Pack=2)]
+struct Foo {
+        short a;
+        int b;
+}
+
+We're now generating:
+
+  .class private sequential ansi sealed beforefieldinit Foo
+  	extends [mscorlib]System.ValueType
+  {
+    .field  private   int16 a
+    .field  private   int32 b
+
+  } // end of class Foo
+
+whereas, on MS, we get:
+
+  .class private sequential ansi sealed beforefieldinit Foo
+  	extends [mscorlib]System.ValueType
+  {
+    .pack 2
+    .size 0
+    .field  private   int16 a
+    .field  private   int32 b
+
+  } // end of class Foo
+
+This is only affection the HEAD branch, as the patch did not land in the
+mono-1-0 branch.