[Mono-bugs] [Bug 78031][Wis] Changed - gmcs generates invalid IL for iterators

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Apr 7 13:32:46 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 vargaz at gmail.com.

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

--- shadow/78031	2006-04-06 00:48:19.000000000 -0400
+++ shadow/78031.tmp.22196	2006-04-07 13:32:46.000000000 -0400
@@ -11,13 +11,13 @@
 AssignedTo: rharinath at novell.com                            
 ReportedBy: sanxiyn at gmail.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
-Summary: IronPython.Runtime.UserType miscompiled?
+Summary: gmcs generates invalid IL for iterators
 
 SVN revision 59107. Always reproducible.
 
 1. Get IronPython 1.0 Beta 5
 
 2. Create test.py
@@ -69,6 +69,41 @@
    at IronPythonConsole.PythonCommandLine.RunFile(PythonEngine engine,
 ArrayList
  args)
 SystemError: Operation could destabilize the runtime.
 
 F:\Documents and Settings\sanxiyn\Desktop\IronPython-1.0-Beta5>
+
+------- Additional Comments From vargaz at gmail.com  2006-04-07 13:32 -------
+This is because mcs generates invalid IL for the following test case:
+
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+using System;
+using System.Collections.Generic;
+
+public class Tests {
+
+	Dictionary<object, object> objData;
+
+        public IEnumerator<KeyValuePair<object, object>> GetEnumerator() {
+            if (objData != null) {
+                foreach(KeyValuePair<object, object> o in objData){
+                    yield return o;
+                }
+            }
+	}
+
+        public static int Main ()
+        {
+			Tests t = new Tests ();
+			foreach (KeyValuePair<object, object> o in t)
+				Console.WriteLine (o);
+
+			return 0;
+        }
+}
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+Running this with PEVerify prints:
+... Tests+<GetEnumeration>__0:MoveNext ()[offset 0x...] Stack depth
+differs depending on path.
+


More information about the mono-bugs mailing list