[Mono-bugs] [Bug 52853][Wis] New - using null with System.ValueType causes runtime crash
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 14 Jan 2004 12:24:43 -0500 (EST)
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 atsushi@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=52853
--- shadow/52853 2004-01-14 12:24:43.000000000 -0500
+++ shadow/52853.tmp.14859 2004-01-14 12:24:43.000000000 -0500
@@ -0,0 +1,53 @@
+Bug#: 52853
+Product: Mono/Runtime
+Version: unspecified
+OS:
+OS Details: XP, cygwin-1.5.5-1
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: atsushi@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: using null with System.ValueType causes runtime crash
+
+Basically null cannot be set to value types, but System.ValueType looks to
+allow it under CLR.
+
+--------
+using System;
+
+class Test
+{
+ public static void Main ()
+ {
+ ValueType vt = null;
+ }
+}
+
+
+mono result:
+** ERROR **: Invalid IL code at IL0006 in .Test:Main (): IL_0006: stloc.0
+
+aborting...
+
+mint result:
+** ERROR **: file object.c: line 1861 (mono_value_box): assertion failed:
+(class->valuetype)
+aborting...
+
+Expected Results:
+
+The above code runs without errors.
+
+How often does this happen?
+
+Always (at least under cygwin).
+
+Additional Information:
+I tried both csc and mcs to generate this IL and both of them failed.