+2008-10-02 Mark Probst <mark.probst@gmail.com>
+
+ * method-to-ir.c (mono_method_to_ir2): Array methods are
+ special-cased and must not be invoked indirectly via the (M)RGCTX
+ when generic sharing is turned on. Fixes #431413.
+
2008-10-01 Mark Probst <mark.probst@gmail.com>
* method-to-ir.c: When generic sharing is active, call
/* Generic sharing */
/* FIXME: only do this for generic methods if
they are not shared! */
- if (context_used && !imt_arg &&
+ if (context_used && !imt_arg && !array_rank &&
(!mono_method_is_generic_sharable_impl (cmethod, TRUE) ||
!mono_class_generic_sharing_enabled (cmethod->klass)) &&
(!virtual || cmethod->flags & METHOD_ATTRIBUTE_FINAL ||
+2008-10-02 Mark Probst <mark.probst@gmail.com>
+
+ * bug-431413.2.cs: Test for bug #431413 (multidimensional generic
+ arrays).
+
+ * Makefile.am: Test added.
+
2008-10-01 Zoltan Varga <vargaz@gmail.com>
* pinvoke3.cs libtest.c: Add test for byref string marshalling.
generic-type-builder.2.cs \
generic-synchronized.2.cs \
generic-delegate-ctor.2.cs \
+ bug-431413.2.cs \
recursive-generics.2.cs \
bug-80392.2.cs \
dynamic-method-access.2.cs \
generic-valuetype-newobj.2.exe generic-valuetype-newobj2.2.exe \
generic-getgenericarguments.2.exe generic-type-builder.2.exe \
generic-synchronized.2.exe generic-delegate-ctor.2.exe \
- generic-constrained.2.exe
+ generic-constrained.2.exe bug-431413.2.exe
@for fn in $+ ; do \
echo "Testing $$fn ..."; \
MONO_GENERIC_SHARING=all $(RUNTIME) -O=gshared $$fn > $$fn.stdout || exit 1; \
--- /dev/null
+using System;
+
+class Test
+{
+ public Test ()
+ {
+
+ }
+
+ static int Main ()
+ {
+ TestMatrix<Test> tMat = new TestMatrix<Test> ();
+ tMat.setStuff (new Test (), 0, 0);
+ return 0;
+ }
+}
+
+class TestMatrix<T>
+{
+ private T[,] _matrix;
+
+ public TestMatrix ()
+ {
+ _matrix = new T[1, 1];
+ }
+
+ public void setStuff (T item, int row, int column)
+ {
+ _matrix[row, column] = item;
+ }
+
+}