[Mono-bugs] [Bug 61512][Nor] Changed - IlAsm class explicity layout and .pack directive

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Aug 2 05:24:29 EDT 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 jankit at novell.com.

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

--- shadow/61512	2004-07-13 23:41:09.000000000 -0400
+++ shadow/61512.tmp.14654	2005-08-02 05:24:29.000000000 -0400
@@ -48,6 +48,71 @@
 How often does this happen? 
 
 always
 
 ------- Additional Comments From spam_andir at mail.ru  2004-07-13 23:41 -------
 This related with "Inside IL Assembler" Samples.
+
+------- Additional Comments From jankit at novell.com  2005-08-02 05:24 -------
+Basically, if only ONE of .pack or .size is not
+specified then ilasm(ms.net) uses the default values. Our ilasm simply
+puts -1 (65535) as the packing if only .size is specified. I've
+confirmed this via the attached test case.
+
+--------------------------
+.class public explicit CharArray8 extends [mscorlib]System.ValueType
+{ .pack 8 }
+.class public explicit CharArray9 extends [mscorlib]System.ValueType
+{ .size 16 }
+.class public explicit CharArrayA extends [mscorlib]System.ValueType
+{ }
+--------------------------
+
+
+Compiling with ms.net's ilasm gives :
+
+--------------------------
+.class public explicit ansi sealed CharArray8
+       extends [mscorlib]System.ValueType
+{
+  .pack 8
+  .size 0
+} // end of class CharArray8
+
+.class public explicit ansi sealed CharArray9
+       extends [mscorlib]System.ValueType
+{
+  .pack 1
+  .size 15
+} // end of class CharArray9
+
+.class public explicit ansi sealed CharArrayA
+       extends [mscorlib]System.ValueType
+{
+} // end of class CharArrayA
+--------------------------
+
+our ilasm gives 
+--------------------------
+.class public explicit ansi CharArray8
+        extends [mscorlib]System.ValueType
+  {
+
+  } // end of class CharArray8
+
+  .class public explicit ansi CharArray9
+        extends [mscorlib]System.ValueType
+  {
+    .pack 65535
+    .size 16
+
+  } // end of class CharArray9
+
+  .class public explicit ansi CharArrayA
+        extends [mscorlib]System.ValueType
+  {
+
+  } // end of class CharArrayA
+
+--------------------------
+
+Also, attached is the patch.


More information about the mono-bugs mailing list