[Mono-bugs] [Bug 81157][Min] New - trying to ldftn a dynamicmethod crashes the runtime

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Mar 16 07:23:27 EDT 2007

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 tomba at bat.org.


--- shadow/81157	2007-03-16 06:23:27.000000000 -0500
+++ shadow/81157.tmp.25566	2007-03-16 06:23:27.000000000 -0500
@@ -0,0 +1,34 @@
+Bug#: 81157
+Product: Mono: Runtime
+Version: 1.2
+OS: GNU/Linux [Other]
+OS Details: Debian Etch x86
+Status: NEW   
+Priority: Minor
+Component: JIT
+AssignedTo: lupus at ximian.com                            
+ReportedBy: tomba at bat.org               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: trying to ldftn a dynamicmethod crashes the runtime
+Trying to use ldftn opcode to a DynamicMethod crashes the runtime:
+DynamicMethod method = new DynamicMethod("func", typeof(void), new Type[0],
+ILGenerator ilgen = method.GetILGenerator();
+ilgen.Emit(OpCodes.Ldftn, method);
+method.Invoke(null, new object[0]);
+** ERROR **: file reflection.c: line 9783 (resolve_object): assertion
+failed: (method->mhandle)
+MS CLR refuses to emit that IL code, throwing an exception: Ldtoken, Ldftn
+and Ldvirtftn OpCodes cannot target DynamicMethods.

More information about the mono-bugs mailing list