[Mono-bugs] [Bug 75479][Maj] Changed - [GMCS] GC is confused by
generic structs
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sat Jul 9 12:10:39 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 malekith at pld-linux.org.
http://bugzilla.ximian.com/show_bug.cgi?id=75479
--- shadow/75479 2005-07-09 08:56:46.000000000 -0400
+++ shadow/75479.tmp.32672 2005-07-09 12:10:39.000000000 -0400
@@ -94,6 +94,50 @@
------- Additional Comments From nazgul at omega.pl 2005-07-09 08:25 -------
It is GC-related, the problem disappears with GC_DONT_GC flag set
------- Additional Comments From malekith at pld-linux.org 2005-07-09 08:56 -------
If I were to guess now it's about wrong gc_descr, something around
object.c:493.
+
+------- Additional Comments From malekith at pld-linux.org 2005-07-09 12:10 -------
+A nicer testcase:
+
+struct Cont<T> {
+ public T f;
+}
+
+class C2 {
+ public Cont<string> c;
+
+ public C2 (int n) {
+ c.f = n.ToString () + "foo";
+ }
+}
+
+class M {
+ public static void Main ()
+ {
+ int n = 5;
+ C2[] ar = new C2[n];
+ for (int i = 0; i < n; ++i) {
+ ar [i] = new C2(i);
+ System.GC.Collect ();
+ }
+ for (int i = 0; i < n; ++i)
+ System.Console.WriteLine (ar[i].c.f);
+ }
+}
+
+
+[malekith at r64 /shm]$ GC_DONT_GC=1 ~/mono-svn/bin/mono ./bar.exe
+0foo
+1foo
+2foo
+3foo
+4foo
+[malekith at r64 /shm]$ ~/mono-svn/bin/mono ./bar.exe
+csascii
+cp367
+4foo
+cp367
+4foo
+
More information about the mono-bugs
mailing list