[Mono-bugs] [Bug 82015][Nor] New - Crash when creating an arraytype from an uncomplete type

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Jul 5 14:35:53 EDT 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 mono at evain.net.

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

--- shadow/82015	2007-07-05 14:35:53.000000000 -0400
+++ shadow/82015.tmp.8760	2007-07-05 14:35:53.000000000 -0400
@@ -0,0 +1,47 @@
+Bug#: 82015
+Product: Mono: Runtime
+Version: 1.2
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: mono at evain.net               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Crash when creating an arraytype from an uncomplete type
+
+Compile and run:
+
+using System;
+using System.Reflection;
+using System.Reflection.Emit;
+
+namespace ArrayBug
+{
+	class MainClass
+	{
+		public static void Main(string[] args) {
+
+			AssemblyName name = new AssemblyName();
+			name.Name = "foo";
+
+			AssemblyBuilder asm =
+AppDomain.CurrentDomain.DefineDynamicAssembly(name,
+AssemblyBuilderAccess.Run|AssemblyBuilderAccess.Save);
+			ModuleBuilder module = asm.DefineDynamicModule("foo.dll", "foo.dll", true);
+
+			TypeBuilder builder = module.DefineType("FooEnum",
+			TypeAttributes.Sealed|TypeAttributes.Serializable,
+				typeof(System.Enum));
+
+			Type arrayType = builder.MakeArrayType();
+			Console.WriteLine(arrayType);
+		}
+	}
+}


More information about the mono-bugs mailing list