Bugzilla – Bug 320531
[GMCS] Regression in IL verification of generic code from mscorlib
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by nazgul@omega.pl 2006-03-12 14:24:15 MST ---- Please fill in this template when reporting a bug, unless you know what you are doing. Description of Problem: One of the recent patches (in svn) caused error when using enumerator from System.Collections.Generic.Dictionary class. Steps to reproduce the problem: 1. Compile and run following program using System.Collections.Generic; class M { static void Main() { Dictionary <string, object> a = new Dictionary <string, object>(); a.Add ("a", null); foreach (object x in a) { System.Console.WriteLine (x); } } } Actual Results: Unhandled Exception: System.InvalidProgramException: Invalid IL code in Enumerator:.ctor (System.Collections.Generic.Dictionary`2): IL_0009: ldfld 0x0a000072 in <0x00000> <unknown method> in <0x00020> System.Collections.Generic.Dictionary`2[System.String,System.Object]:GetEnumerator () in <0x0004e> M:Main () Expected Results: [a, ] How often does this happen? With recent svn always. Additional Information: This broke our Nemerle build/test few days ago. ---- Additional Comments From atsushi@ximian.com 2006-03-12 14:37:28 MST ---- *** https://bugzilla.novell.com/show_bug.cgi?id=MONO77771 has been marked as a duplicate of this bug. *** ---- Additional Comments From miguel@ximian.com 2006-03-12 16:10:39 MST ---- Maybe this is due to the new verifier changes? Am CCing Lupus. ---- Additional Comments From lupus@ximian.com 2006-03-13 04:24:23 MST ---- It happens because instantiated generic types don't set up the nesting type correctly. I told Martin yesterday. ---- Additional Comments From lupus@ximian.com 2006-03-13 05:06:54 MST ---- Fixed the generics code in svn. ---- Additional Comments From martin@ximian.com 2006-03-14 08:41:46 MST ---- The fix introduced a regression and is reverted in SVN. ---- Additional Comments From lupus@ximian.com 2006-03-14 15:41:54 MST ---- Hari fixed the unrelated issue, so the change is again committed in svn. Unknown operating system unknown. Setting to default OS "Other".