[Mono-bugs] [Bug 75014][Nor] Changed - Using RAIL to copy a method with exception handlers triggers assertion

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat May 21 15:42:51 EDT 2005


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 vladimir at pobox.com.

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

--- shadow/75014	2005-05-21 15:33:30.000000000 -0400
+++ shadow/75014.tmp.29950	2005-05-21 15:42:51.000000000 -0400
@@ -85,6 +85,25 @@
 miss-compiling?
 
 ------- Additional Comments From vladimir at pobox.com  2005-05-21 15:33 -------
 Created an attachment (id=15186)
 simplified version of foo.cs
 
+
+------- Additional Comments From vladimir at pobox.com  2005-05-21 15:42 -------
+The attached foo.cs shows the problem.. I also just attached an even
+simpler version of foo.cs -- just a method with try { } catch
+(Exception e) { } inside the body.
+
+I spent some more time tracking this down last night; I may be
+completely wrong, but it seems that mcs always emits a finally block
+if any exceptions are used.  This is controlled by emit_finally on
+ExceptionStatement and FlowBranchingException, but it defaults to true
+and the only way for it to go false is for
+FlowBranchingException.StealFinallyClauses() to be called... but
+that's only called if emit_finally is already false.
+
+I hacked together a patch that fixes my testcase but managed to break
+test-53 in the process (dispose isn't getting called when an exception
+is thrown from within using inside an exception handler).. if I fix
+that, I'll post a patch.
+


More information about the mono-bugs mailing list