[Mono-bugs] [Bug 74953][Maj] Changed - [GMCS] Converting array to
IEnumerable<T>
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu May 19 08:45:59 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 martin at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=74953
--- shadow/74953 2005-05-19 08:44:21.000000000 -0400
+++ shadow/74953.tmp.4400 2005-05-19 08:45:59.000000000 -0400
@@ -176,6 +176,20 @@
------- Additional Comments From martin at ximian.com 2005-05-19 08:43 -------
Whoever looks at this bug, don't get confused by Miguel's last comment
- it's not the assembly code which is wrong.
------- Additional Comments From martin at ximian.com 2005-05-19 08:44 -------
I hate bugzilla for typing in a long comment and then eating it :-(
+
+------- Additional Comments From martin at ximian.com 2005-05-19 08:45 -------
+Just look at the IL:
+
+ IL_0001: newarr [mscorlib]System.Byte
+ IL_0006: call void class X`1<uint8>::Y(class
+[mscorlib]System.Collections.Generic.IEnumerable`1<!0>)
+
+After the `newarr', there's an instance of System.Array on the stack.
+
+The `call' expects an instance of S.C.G.IEnumerable<T>. Later on, the
+called method will make an indirect call through the vtable to call
+`GetEnumerator()' (or whatever) and this'll crash since it's using the
+wrong `MonoClass *'.
More information about the mono-bugs
mailing list