[Mono-bugs] [Bug 75831][Min] Changed - [GMCS] [PATCH]
Multidimensional array as generic paramater causes gmcs to crash
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Aug 22 15:40:27 EDT 2005
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 malekith at pld-linux.org.
http://bugzilla.ximian.com/show_bug.cgi?id=75831
--- shadow/75831 2005-08-22 09:49:33.000000000 -0400
+++ shadow/75831.tmp.18543 2005-08-22 15:40:27.000000000 -0400
@@ -11,13 +11,13 @@
AssignedTo: mono-bugs at ximian.com
ReportedBy: kiess at h3c.de
QAContact: mono-bugs at ximian.com
TargetMilestone: ---
URL:
Cc:
-Summary: [GMCS] Multidimensional array as generic paramater causes gmcs to crash
+Summary: [GMCS] [PATCH] Multidimensional array as generic paramater causes gmcs to crash
Description of Problem: Using int[,] as a type parameter for a generic type
crashes gmcs
Steps to reproduce the problem:
@@ -110,6 +110,20 @@
Ok, the real problem is that dup_type doesn't correctly copy stuff for
arrays (and for function pointers). It does for regular pointers
though (
http://lists.ximian.com/pipermail/mono-patches/2005-February/055177.html )
I will create a patch shortly.
+
+------- Additional Comments From malekith at pld-linux.org 2005-08-22 15:40 -------
+I attach a patch to fix this issue. It adds copying of MonoArrayType
+and MonoMethodSignatur for MONO_TYPE_ARRAY and MONO_TYPE_FNPTR
+respectively. Now it is safe to do:
+
+ tmp = dup_type (t);
+ mono_metadata_free_type (tmp);
+ use (t);
+
+The dup_type function got quite big. Maybe it would be good not to
+mark it inline and make it non-static, so only one copy can be used?
+If so I can post a patch for it.
+
More information about the mono-bugs
mailing list