[Mono-bugs] [Bug 55976][Wis] New - Runtime does not accept item on stack in `endfinally'
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Tue, 23 Mar 2004 18:01:19 -0500 (EST)
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 bmaurer@users.sf.net.
http://bugzilla.ximian.com/show_bug.cgi?id=55976
--- shadow/55976 2004-03-23 18:01:18.000000000 -0500
+++ shadow/55976.tmp.19660 2004-03-23 18:01:18.000000000 -0500
@@ -0,0 +1,74 @@
+Bug#: 55976
+Product: Mono: Runtime
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: bmaurer@users.sf.net
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Runtime does not accept item on stack in `endfinally'
+
+The following code gives
+** ERROR **: Invalid IL code at IL0007 in T:Main (): IL_0007: ret
+
+.assembly extern mscorlib
+{
+ .ver 1:0:5000:0
+}
+.assembly 't'
+{
+ .hash algorithm 0x00008004
+ .ver 0:0:0:0
+}
+.module 't.exe' // GUID = {BC66F1B3-12C5-4F80-B822-401EFDD070D5}
+
+
+ .class private auto ansi beforefieldinit 'T'
+ extends [mscorlib]System.Object
+ {
+
+ // method line 1
+ .method public static hidebysig
+ default void 'Main' () cil managed
+ {
+ // Method begins at RVA 0x2050
+ .entrypoint
+ // Code size 8 (0x8)
+ .maxstack 2
+ .try { // 0
+ IL_0000: leave IL_0007
+
+ } // end .try 0
+ finally { // 0
+ IL_0005: ldc.i4.0
+ IL_0006: endfinally
+ } // end handler 0
+ IL_0007: ret
+ } // end of method T::default void 'Main' ()
+
+ // method line 2
+ .method public hidebysig specialname rtspecialname
+ instance default void .ctor () cil managed
+ {
+ // Method begins at RVA 0x2074
+ // Code size 7 (0x7)
+ .maxstack 1
+ IL_0000: ldarg.0
+ IL_0001: call instance void valuetype
+[mscorlib]'System.Object'::.ctor()
+ IL_0006: ret
+ } // end of method T::instance default void .ctor ()
+
+ } // end of type T
+
+
+I can run the same thing on the MS runtime, and peverify does not complain.
+I can't find anything in the spec to dispute the validity of this IL.