[Mono-bugs] [Bug 78031][Nor] Changed - [GMCS] gmcs generates
invalid IL for iterators
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri Apr 7 21:32:38 EDT 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 miguel at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=78031
--- shadow/78031 2006-04-07 20:32:17.000000000 -0400
+++ shadow/78031.tmp.2673 2006-04-07 21:32:38.000000000 -0400
@@ -117,6 +117,36 @@
the sample test case.
I was looking at the disassembled IL, and although it produces the
incorrect IL I can not find the two "codepaths" that would lead to the
problem. Also, the sample program works fine with Mono (even if I
populate the objData Dictionary).
+
+------- Additional Comments From miguel at ximian.com 2006-04-07 21:32 -------
+The Illegal IL report from PEverify seems to be wrong, I reduced the
+generated routine to this:
+
+ .method public hidebysig newslot virtual final
+ instance bool MoveNext() cil managed
+ {
+ // Code size 193 (0xc1)
+ .maxstack 12
+ .locals init (int32 V_0,
+ valuetype
+[mscorlib]System.Collections.Generic.KeyValuePair`2<object,object> V_1)
+
+ IL_0071:
+ IL_0077: ldarg.0
+ IL_0078: ldflda valuetype
+[mscorlib]System.Collections.Generic.Dictionary`2/Enumerator<object,object>
+Tests/'<GetEnumerator>__0'::'<1:$s_1>'
+ IL_007d: call instance void valuetype
+[mscorlib]System.Collections.Generic.Dictionary`2/Enumerator<object,object>::Dispose()
+ IL_008e: ldarg.0
+ IL_008f: ldfld int32 Tests/'<GetEnumerator>__0'::$PC
+ IL_0094: switch (
+ IL_0071)
+ IL_00bf: ldc.0
+ IL_00c0: ret } // end of method '<GetEnumerator>__0'::MoveNext
+
+And PEVerify continued to complain about it, somehow it gets confused
+by the back switch.
More information about the mono-bugs
mailing list