[Mono-bugs] [Bug 55253][Maj] New - IndexOf on null string hangs.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 6 Mar 2004 09:19:22 -0500 (EST)


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 dave-mono@earth.li.

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

--- shadow/55253	2004-03-06 09:19:22.000000000 -0500
+++ shadow/55253.tmp.29729	2004-03-06 09:19:22.000000000 -0500
@@ -0,0 +1,52 @@
+Bug#: 55253
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: dave-mono@earth.li               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: IndexOf on null string hangs.
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+If you do 
+
+((string)null).IndexOf('a');
+
+it will never return.
+
+Steps to reproduce the problem:
+1. 
+using System;
+class t1 {
+    static void Main(string [] args )
+    {
+      Console.WriteLine(((string)null).IndexOf('a'));
+    }
+}
+
+2. compile, run
+
+
+Actual Results:
+ - Busy hang
+
+Expected Results:
+  - Unhandled Exception: System.NullReferenceException: Object reference no
+an instance of an object.
+   at t1.Main(String[] args)
+
+
+How often does this happen? 
+ All the time.