[Mono-bugs] [Bug 73517][Nor] Changed - ilasm doesn't support .param directives

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 16 Mar 2005 03:56:05 -0500 (EST)

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 radical@gmail.com.


--- shadow/73517	2005-03-15 20:59:35.000000000 -0500
+++ shadow/73517.tmp.29878	2005-03-16 03:56:05.000000000 -0500
@@ -61,6 +61,25 @@
     .field public static literal valuetype menum First = int8(0x04)
     .field public static literal valuetype menum Second = int8(0x6D)
   } // end of class menum
 If you disassemble the assembly produced by ilasm from this test case,
 the 'foo' method doesn't contain the .param directive.
+------- Additional Comments From radical@gmail.com  2005-03-16 03:56 -------
+I'm attaching the proposed patch. Due to some problem at my end I
+generated them as two files! Anyway, .. support for .param directive
+has been added. But that exposed another problem : 
+If the .il file has one/more .param directives and >=2 default values
+for fields (like in the original test case), then the runtime is not
+able to find the rows for in the constant table. The reason is that
+the runtime does a 'bsearch' on the table rows, but the table is not
+sorted by PEAPI! 
+According to the CLI docs, some tables MUST be sorted. These are now
+being sorted by the keys indicated in the doc.
+Another problem was that the ParamAttr.Opt had the wrong code assigned
+to it, 4 instead of 16 (0x0010).
+All these changes were required for the test case to work properly.
+the generated dll/exe passes PEVerify also.