[Mono-bugs] [Bug 78770][Min] New - lock(null) causes output to reference the "msc" assembly

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Jul 5 20:30:12 EDT 2006

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 bzximian.3.crazycomputers at neverbox.com.


--- shadow/78770	2006-07-05 20:30:11.000000000 -0400
+++ shadow/78770.tmp.17524	2006-07-05 20:30:11.000000000 -0400
@@ -0,0 +1,53 @@
+Bug#: 78770
+Product: Mono: Compilers
+Version: 1.1
+OS Details: Debian etch
+Status: NEW   
+Severity: Unknown
+Priority: Minor
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: bzximian.3.crazycomputers at neverbox.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: lock(null) causes output to reference the "msc" assembly
+Description of Problem:
+Compiling any code with a "lock(null) {}" block will generate an assembly
+that depends on the mcs.exe assembly to run, as the compiler incorrectly
+creates a local Mono.CSharp.NullType.
+This is not a very critical bug, as such code is doomed to fail anyway, but
+csc will not generate any locals and will simply throw the expected
+Steps to reproduce the problem:
+using System;
+public class Foo {
+   public static void Main() {
+      lock (null) {
+      }
+   }
+Actual Results:
+Generated program fails, unable to find the mcs assembly (unless mcs.exe is
+copied or linked in the current directory, which will cause the program to
+run and fail the expected way).
+Expected Results:
+The assembly should not contain a Mono.CSharp.NullType local, or any local,
+and should not depend on mcs.
+How often does this happen? 

More information about the mono-bugs mailing list