[Mono-bugs] [Bug 76061][Wis] New - Generic.Dictionary(0) throws
DivideByZeroException on Add
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sun Sep 11 14:45:20 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 emrysk at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=76061
--- shadow/76061 2005-09-11 14:45:20.000000000 -0400
+++ shadow/76061.tmp.2447 2005-09-11 14:45:20.000000000 -0400
@@ -0,0 +1,49 @@
+Bug#: 76061
+Product: Mono: Class Libraries
+Version: 1.1
+OS: GNU/Linux [Other]
+OS Details: Ubuntu: Hoary
+Status: NEW
+Resolution:
+Severity: Unknown
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: emrysk at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Generic.Dictionary(0) throws DivideByZeroException on Add
+
+Generic Dictionary throws a DivideByZeroException during Add if initialized
+with 0 for it's initial capacity.
+
+Here's a test case:
+
+using System.Collections.Generic;
+class Program
+{
+ static void Main()
+ {
+ Dictionary<string,string> dict = new Dictionary<string,string>(0);
+ dict.Add("some", "thing");
+ }
+}
+
+Here's the trace:
+
+Unhandled Exception: System.DivideByZeroException: Division by zero
+in <0x00000> <unknown method>
+in (wrapper managed-to-native) System.Object:__icall_wrapper___emul_lrem
+(long,long)
+in <0x00067>
+System.Collections.Generic.Dictionary`2<System.String,System.String>:DoHash
+(System.String )
+in <0x00023>
+System.Collections.Generic.Dictionary`2<System.String,System.String>:GetSlot
+(System.String )
+in <0x00015>
+System.Collections.Generic.Dictionary`2<System.String,System.String>:Add
+(System.String , System.String )
+in <0x00034> Program:Main ()
More information about the mono-bugs
mailing list