[Mono-bugs] [Bug 43038][Nor] New - Mono fails with invalid IL

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Thu, 15 May 2003 00:04:53 -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 mathpup@mylinuxisp.com.

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

--- shadow/43038	Thu May 15 00:04:53 2003
+++ shadow/43038.tmp.20671	Thu May 15 00:04:53 2003
@@ -0,0 +1,64 @@
+Bug#: 43038
+Product: Mono/Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: mathpup@mylinuxisp.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Mono fails with invalid IL
+
+Description of Problem: 
+ 
+When a C# program compiled with mcs contains a loop instead a try statement, 
+mono complains about invalid IL. However, if the try statement includes a catch 
+clause, the program runs normally. I'm attaching the IL with and without the catch 
+clause. 
+ 
+Steps to reproduce the problem: 
+1. mcs loop.cs 
+2. mono loop.exe 
+ 
+ 
+Actual Results: 
+ 
+** ERROR **: Invalid IL code at IL0005 in 00 .Bug:Loop (): IL_0005: leave     
+IL_000b 
+ 
+ 
+Expected Results: 
+ 
+Endless loop 
+ 
+ 
+How often does this happen?  
+ 
+Always 
+ 
+ 
+Additional Information: 
+ 
+Works on Rotor. 
+ 
+Test case:  
+ 
+public class Bug { 
+	static void Loop () { 
+		try { 
+			while (true); 
+		} 
+		//catch (System.Exception e) {} 
+		finally {} 
+	} 
+	static void Main () { 
+		Loop (); 
+	} 
+}