[Mono-bugs] [Bug 75831][Min] New - Multidimensional array as generic paramater causes gmcs to crash

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Aug 17 08:15:22 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 kiess at h3c.de.

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

--- shadow/75831	2005-08-17 08:15:22.000000000 -0400
+++ shadow/75831.tmp.7415	2005-08-17 08:15:22.000000000 -0400
@@ -0,0 +1,85 @@
+Bug#: 75831
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: Debian Sarge
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: kiess at h3c.de               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: 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:
+1.
+cat > test.cs << EOF
+class B {
+  System.Collections.Generic.List<int[,]> x;
+
+  static void Main() {}
+}
+EOF
+2. gmcs test.cs
+
+Actual Results:
+
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+in <0x00000> <unknown method>
+in (wrapper managed-to-native) System.Type:BindGenericParameters
+(System.Type,System.Type[])
+in <0x00068> System.Type:MakeGenericType (System.Type[] types)
+in <0x000e7> Mono.CSharp.ConstructedType:DoResolveType
+(Mono.CSharp.EmitContext ec)
+in <0x0012f> Mono.CSharp.ConstructedType:ResolveConstructedType
+(Mono.CSharp.EmitContext ec)
+in <0x0000d> Mono.CSharp.ConstructedType:DoResolveAsTypeStep
+(Mono.CSharp.EmitContext ec)
+in <0x00011> Mono.CSharp.TypeExpr:ResolveAsTypeStep
+(Mono.CSharp.EmitContext ec, Boolean silent)
+in <0x00010> Mono.CSharp.Expression:ResolveAsTypeStep
+(Mono.CSharp.EmitContext ec)
+in <0x00149> Mono.CSharp.MemberAccess:ResolveNamespaceOrType
+(Mono.CSharp.EmitContext ec, Boolean silent)
+in <0x00012> Mono.CSharp.MemberAccess:ResolveAsTypeStep
+(Mono.CSharp.EmitContext ec, Boolean silent)
+in <0x00036> Mono.CSharp.Expression:ResolveAsTypeTerminal
+(Mono.CSharp.EmitContext ec, Boolean silent)
+in <0x00010> Mono.CSharp.Expression:ResolveAsTypeTerminal
+(Mono.CSharp.EmitContext ec)
+in <0x00065> Mono.CSharp.MemberBase:get_MemberType ()
+in <0x0002d> Mono.CSharp.FieldMember:Define ()
+in <0x0001f> Mono.CSharp.Field:Define ()
+in <0x0005a>
+Mono.CSharp.TypeContainer+MemberCoreArrayList:DefineContainerMembers ()
+in <0x00014> Mono.CSharp.TypeContainer:DefineContainerMembers
+(Mono.CSharp.MemberCoreArrayList mcal)
+in <0x002ec> Mono.CSharp.TypeContainer:DoDefineMembers ()
+in <0x0003f> Mono.CSharp.TypeContainer:DefineMembers
+(Mono.CSharp.TypeContainer container)
+in <0x00247> Mono.CSharp.RootContext:PopulateTypes ()
+in <0x00ae1> Mono.CSharp.Driver:MainDriver (System.String[] args)
+in <0x0001f> Mono.CSharp.Driver:Main (System.String[] args)
+
+
+Expected Results:
+The code should compile.
+
+How often does this happen? 
+Always
+
+Additional Information:
+The same error appears with the nemerle compiler, so the bug is probably in
+System.Reflection.Emit.
+
+I'm using Mono svn r48453.


More information about the mono-bugs mailing list