[Mono-bugs] [Bug 75079][Wis] New - reflection: empty exception blocks cause mono to crash

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat May 28 02:30:08 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 dsilva at ccs.neu.edu.

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

--- shadow/75079	2005-05-28 02:30:08.000000000 -0400
+++ shadow/75079.tmp.1156	2005-05-28 02:30:08.000000000 -0400
@@ -0,0 +1,57 @@
+Bug#: 75079
+Product: Mono: Runtime
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: dsilva at ccs.neu.edu               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: reflection: empty exception blocks cause mono to crash
+
+Description of Problem:
+
+In this sample program, ignore the scaffolding and just look at the two
+ILGenerator method calls.
+
+using System;
+using System.Reflection;
+using System.Reflection.Emit;
+
+public class App {
+  public static void Main() {
+    const string outfile = "test-outfile.exe";
+    AssemblyName name = new AssemblyName();
+    name.Name = "MyDynamicAssembly";
+    AssemblyBuilder asm =
+AppDomain.CurrentDomain.DefineDynamicAssembly(name,
+AssemblyBuilderAccess.Save);
+    ModuleBuilder mod = asm.DefineDynamicModule("MyModule", outfile, true);
+    TypeBuilder type = mod.DefineType("MyType", TypeAttributes.Public,
+typeof(object), Type.EmptyTypes);
+    MethodBuilder method = type.DefineMethod("mymethod",
+MethodAttributes.Public, typeof(void), Type.EmptyTypes);
+    ILGenerator il = method.GetILGenerator();
+
+    il.BeginExceptionBlock();
+    il.EndExceptionBlock();
+
+    type.CreateType();
+  }
+}
+
+
+$ mcs -debug exn-block.cs
+$ mono --debug exn-block.exe
+** ERROR **: file reflection.c: line 835 (method_encode_clauses): assertion
+failed: (ex_info->handlers)
+aborting...
+Aborted
+$


More information about the mono-bugs mailing list