[Mono-bugs] [Bug 76002][Nor] Changed - Assertion failure in reflection.c : line 835 (method_encode_clauses) while running Boo compiler

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Sep 6 20:41:34 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 brion at pobox.com.


--- shadow/76002	2005-09-06 20:35:41.000000000 -0400
+++ shadow/76002.tmp.12512	2005-09-06 20:41:34.000000000 -0400
@@ -2,13 +2,13 @@
 Product: Mono: Runtime
 Version: 1.1
 OS: All
 OS Details: 
 Status: NEW   
+Severity: Unknown
 Priority: Normal
 Component: misc
 AssignedTo: mono-bugs at ximian.com                            
 ReportedBy: brion at pobox.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
@@ -59,6 +59,27 @@
 .NET 1.1 runtime on Windows XP SP2 runs correctly.
 ------- Additional Comments From brion at pobox.com  2005-09-06 20:35 -------
 Created an attachment (id=15701)
 Short C# program using System.Reflection.Emit to reproduce the problem case
+------- Additional Comments From brion at pobox.com  2005-09-06 20:41 -------
+Attached C# program reproduces the problem: it attempts to emit an 
+exception block without any catch blocks in it. On Mono this produces 
+the assertion failure reported above.
+On .NET 1.1 this throws an exception:
+Unhandled Exception: System.InvalidOperationException: Incorrect code 
+generation for exception block.
+   at System.Reflection.Emit.ILGenerator.EndExceptionBlock()
+   at ReflectionCrasher.Main()
+MSDN docs for ILGenerator.EndExceptionBlock indicate it should throw 
+this exception if "the end exception block occurs in an unexpected 
+place in the code stream":
+An exception can be caught by a compiler and an internal error 
+reported, but the assertion just kills the runtime immediately.

More information about the mono-bugs mailing list