[Mono-bugs] [Bug 44304][Cos] New - Assertion, not exception when array with rank > 255 is created

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Sun, 8 Jun 2003 13:41:14 -0400 (EDT)


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 bmaurer@users.sf.net.

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

--- shadow/44304	Sun Jun  8 13:41:14 2003
+++ shadow/44304.tmp.18657	Sun Jun  8 13:41:14 2003
@@ -0,0 +1,61 @@
+Bug#: 44304
+Product: Mono/Runtime
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Cosmetic
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bmaurer@users.sf.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Assertion, not exception when array with rank > 255 is created
+
+When an array with a large rank is created, an assertion is thrown and mono
+aborts. MS throws an exception
+
+
+Steps to reproduce the problem:
+using System;
+
+public class Bug {
+
+	public static int Main () {
+		try {
+			Array a = Array.CreateInstance (typeof (int), new int [1000]);
+			
+			Console.WriteLine ("Exception not thrown!!");
+			return 1;
+		} catch (TypeLoadException) {
+			Console.WriteLine ("PASS!");
+			return 0;
+		}
+		catch (Exception e) {
+			Console.WriteLine ("Wrong Exception");
+			Console.WriteLine (e.ToString ());
+			return 1;
+		}
+	}
+}
+
+Actual Results:
+** ERROR **: file class.c: line 1534 (mono_array_class_get): assertion
+failed: (rank <= 255)
+aborting...
+Aborted
+
+Expected Results:
+PASS
+[return with exit code 0]
+
+How often does this happen? 
+Always.
+
+
+Additional Information:
+This is from the Rotor test suite. File: co3745createinstance_type_iarr.cs