[Mono-bugs] [Bug 78906][Blo] New - Runtime crashes when working with an array cast to ICollection<>

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Jul 20 07:24:25 EDT 2006


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 ladislav.prosek at matfyz.cz.

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

--- shadow/78906	2006-07-20 07:24:25.000000000 -0400
+++ shadow/78906.tmp.27773	2006-07-20 07:24:25.000000000 -0400
@@ -0,0 +1,55 @@
+Bug#: 78906
+Product: Mono: Runtime
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Blocker
+Component: misc
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: ladislav.prosek at matfyz.cz               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Runtime crashes when working with an array cast to ICollection<>
+
+Description of Problem:
+There seems to be a problem related to array covariance and their support
+of the ICollection<> interface.
+
+Steps to reproduce the problem:
+	class A
+	{ }
+
+	class B : A
+	{ }
+
+	class Program
+	{
+		static void Main(string[] args)
+		{
+			B[] array = new B[0];
+
+			ICollection<A> collection = array;
+			IEnumerator<A> enumerator = collection.GetEnumerator();
+		}
+	}
+
+Actual Results:
+System.NullReferenceException is thrown inside GetEnumerator. Sometimes
+similar setups yield even this:
+
+=================================================================
+Got a SIGSEGV while executing native code. This usually indicates
+a fatal error in the mono runtime or one of the native libraries
+used by your application.
+=================================================================
+
+Expected Results:
+It should work. As it does in CLR.
+
+How often does this happen? 
+Always.


More information about the mono-bugs mailing list