[Mono-bugs] [Bug 47813][Nor] New - nested handler blocks not handled properly

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 21 Aug 2003 23:02:22 -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 l_m@pacbell.net.

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

--- shadow/47813	2003-08-21 23:02:22.000000000 -0400
+++ shadow/47813.tmp.12988	2003-08-21 23:02:22.000000000 -0400
@@ -0,0 +1,56 @@
+Bug#: 47813
+Product: Mono/Runtime
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: l_m@pacbell.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: nested handler blocks not handled properly
+
+Description of Problem:
+In case of nested handler blocks, mono will fail to restore the proper
+stack pointer. (cfg->spvar will get overwritten by the second handler)
+
+Steps to reproduce the problem:
+see code example
+
+Actual Results:
+Infinite loop/crash
+
+Expected Results:
+0
+
+How often does this happen? 
+always
+
+Additional Information:
+using System;
+
+public class Test {
+        public static int Main (string[] args) {
+                int a;
+
+                try {
+                        a = 1;
+                } finally {
+                        Console.WriteLine ("Finally0");
+                        try {
+                                a = 2;
+                        } finally {
+                                Console.WriteLine ("Finally1");
+                                a = 0;
+                        }
+                }
+                Console.WriteLine ("Returning " + a);
+                return a;
+        }
+}