[Mono-bugs] [Bug 70992][Blo] New - Segment fault instead of OutOfMemoryException

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 4 Jan 2005 14:15:53 -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 joannes.vermorel@ens.fr.

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

--- shadow/70992	2005-01-04 14:15:53.000000000 -0500
+++ shadow/70992.tmp.25425	2005-01-04 14:15:53.000000000 -0500
@@ -0,0 +1,57 @@
+Bug#: 70992
+Product: Mono: Runtime
+Version: 1.1
+OS: Red Hat 9.0
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Blocker
+Component: JIT
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: joannes.vermorel@ens.fr               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Segment fault instead of  OutOfMemoryException
+
+I get a "Segment fault (core dumped)" at mono execution where an
+OutOfMemoryException should be thrown.
+
+=== Steps to reproduce the problem:
+
+With an AMD 64Bit and 2Go of memory, I compile:
+
+class MainClass
+{
+	[STAThread]
+	static void Main(string[] args)
+	{
+		int length = int.Parse(args[0]);
+		int[] array = new int[length];
+		for(int i = 0; i < length; i++) array[i] = i;
+	}
+}
+
+From the command line:
+$ mono MonoTest.exe 266000000
+
+=== Actual Results:
+$ Segmentation fault (core dumped)
+
+=== Expected Results:
+$ Unhandled Exception: System.OutOfMemoryException: Out of memory
+
+=== Additional Information:
+
+When I do 
+$ mono MonoTest.exe 267000000
+
+I get the correct message
+$ Unhandled Exception: System.OutOfMemoryException: Out of memory
+
+=== Additional question:
+
+Why do I get an OutOfMemoryException? I should be able to handle array
+twice as big before encountering such exception with 2Go of memory.