[Mono-bugs] [Bug 80432][Wis] New - Overzealous verification: Invalid IL code on stloc with an address

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Jan 2 22:39:20 EST 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 jt at occams.info.

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

--- shadow/80432	2007-01-02 22:39:20.000000000 -0500
+++ shadow/80432.tmp.18763	2007-01-02 22:39:20.000000000 -0500
@@ -0,0 +1,59 @@
+Bug#: 80432
+Product: Mono: Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: JIT
+AssignedTo: lupus at ximian.com                            
+ReportedBy: jt at occams.info               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Overzealous verification: Invalid IL code on stloc with an address
+
+Test program:
+
+class Test {
+    struct MyStruct {
+        public int this[int index] {
+            get { return 123; }
+            set { } // whatever
+        }
+    }
+
+    public static void Main() {
+        MyStruct s = new MyStruct();
+        s[0] += 5;
+    }
+}
+
+Compilation is OK (mcs, gmcs, csc).
+
+Running with Mono (mono-core-1.2.2.1-0.novell in FC6, Linux) yields:
+
+Unhandled Exception: System.InvalidProgramException: Invalid IL code in
+Test:Main (): IL_000b: stloc.1
+
+Microsoft runs the program fine.
+
+Here's the IL up to the point where verification fails:
+
+        .locals init (
+                valuetype Test/MyStruct V_0,
+                valuetype Test/MyStruct&        V_1,
+                int32   V_2)
+
+        IL_0000:  ldloca.s 0
+        IL_0002:  initobj Test/MyStruct
+        IL_0008:  ldloca.s 0
+        IL_000a:  dup 
+        IL_000b:  stloc.1
+
+Thanks!
+
+- Josh


More information about the mono-bugs mailing list