[Mono-bugs] [Bug 78729][Nor] New - Multi dimensional array invalid IL code
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Jun 29 09:51:49 EDT 2006
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 georgegabrielhara at fastmail.fm.
http://bugzilla.ximian.com/show_bug.cgi?id=78729
--- shadow/78729 2006-06-29 09:51:49.000000000 -0400
+++ shadow/78729.tmp.16767 2006-06-29 09:51:49.000000000 -0400
@@ -0,0 +1,69 @@
+Bug#: 78729
+Product: Mono: Runtime
+Version: 1.1
+OS: Windows XP
+OS Details: XP Pro SP2
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: JIT
+AssignedTo: lupus at ximian.com
+ReportedBy: georgegabrielhara at fastmail.fm
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Multi dimensional array invalid IL code
+
+Please fill in this template when reporting a bug, unless you know what
+you are doing.
+
+
+Description of Problem:
+I am trying to run some C# code under Mono (version 1.1.15, under
+WindowsXP), code which uses multidimensional arrays, but it fails with the
+message "Invalid IL code in AxiomaticIdTesterConsole.Program:test ():
+IL_001e: stloc.0"
+
+If, in the provided example, you'll call the "test" method from a console
+application, using the multidimensional array "key2", you'll see it throws
+an exception with the message from above. If the single dimensional array
+"key1" is used, the code works.
+
+
+Steps to reproduce the problem:
+----------------------------------------
+private static int[] key1 = new int[] { 5, 7, 6, 8 };
+private static int[ , ] key2 = new int[ , ] { { 5, 7 }, { 6, 8 } };
+private static int sum = 0;
+
+private static void test()
+{
+ unsafe
+ {
+ fixed( int* k = key2 ) // Works with "key1", but not with
+"key2".
+ {
+ sum += *k; // No cycle here, so NO broken bounds.
+ }
+ }
+
+ Console.WriteLine( sum );
+}
+----------------------------------------
+
+
+Actual Results:
+Application crashes
+
+
+Expected Results:
+5
+
+How often does this happen?
+Always
+
+
+Additional Information:
+-
More information about the mono-bugs
mailing list