[Mono-bugs] [Bug 74980][Wis] New - [2.0]
System.Collections.Generic.List lazy init is broken
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue May 17 15:53:26 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 grompf at sublimeintervention.com.
http://bugzilla.ximian.com/show_bug.cgi?id=74980
--- shadow/74980 2005-05-17 15:53:26.000000000 -0400
+++ shadow/74980.tmp.19420 2005-05-17 15:53:26.000000000 -0400
@@ -0,0 +1,32 @@
+Bug#: 74980
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: grompf at sublimeintervention.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: [2.0] System.Collections.Generic.List lazy init is broken
+
+The following test case:
+
+System.Collections.Generic.List<string> test = new System.Collections.Generic.List<string>();
+test.Insert(0, "a");
+test.Insert(0, "b");
+
+throws an exception due to initing with 0 size (it tries to shift and insert into a null array)
+
+adding:
+data = new T [DefaultCapacity];
+in the empty .ctor will fix this; however we will loose the gains of lazy initing. Is the check in each
+method versus lazy init benefit worth the cost?
+
+-kangaroo
More information about the mono-bugs
mailing list