[Mono-bugs] [Bug 81338][Nor] New - mcs crashes with NullRefExc on very simple (incorrect) code.
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sun Apr 8 18:35:19 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 juraj at hotfeet.ch.
http://bugzilla.ximian.com/show_bug.cgi?id=81338
--- shadow/81338 2007-04-08 18:35:19.000000000 -0400
+++ shadow/81338.tmp.1163 2007-04-08 18:35:19.000000000 -0400
@@ -0,0 +1,65 @@
+Bug#: 81338
+Product: Mono: Compilers
+Version: 1.2
+OS:
+OS Details: FC6
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: juraj at hotfeet.ch
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: mcs crashes with NullRefExc on very simple (incorrect) code.
+
+Try compiling this code:
+========================
+
+class X {
+ void Y () {
+ for(i = 0; i < 10; i++) {}
+ for(j = 0; j < 10; j++) {}
+ }
+}
+
+
+This result is this:
+====================
+mcs_crash.cs(3,21): error CS0103: The name `i' does not exist in the
+context of `X'
+mcs_crash.cs(3,28): error CS0103: The name `i' does not exist in the
+context of `X'
+mcs_crash.cs(3,36): error CS0103: The name `i' does not exist in the
+context of `X'
+mcs_crash.cs(4,21): error CS0103: The name `j' does not exist in the
+context of `X'
+mcs_crash.cs(4,28): error CS0103: The name `j' does not exist in the
+context of `X'
+mcs_crash.cs(4,36): error CS0103: The name `j' does not exist in the
+context of `X'
+
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+ at Mono.CSharp.FlowBranching.MergeChild (Mono.CSharp.FlowBranching child)
+[0x00000]
+ at Mono.CSharp.EmitContext.DoEndFlowBranching () [0x00000]
+ at Mono.CSharp.EmitContext.EndFlowBranching () [0x00000]
+ at Mono.CSharp.For.Resolve (Mono.CSharp.EmitContext ec) [0x00000]
+ at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x00000]
+ at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x00000]
+ at Mono.CSharp.EmitContext.ResolveTopBlock (Mono.CSharp.EmitContext
+anonymous_method_host, Mono.CSharp.ToplevelBlock block,
+Mono.CSharp.Parameters ip, IMethodData md, System.Boolean& unreachable)
+[0x00000]
+ at Mono.CSharp.EmitContext.EmitTopBlock (IMethodData md,
+Mono.CSharp.ToplevelBlock block) [0x00000]
+ at Mono.CSharp.MethodData.Emit (Mono.CSharp.DeclSpace parent) [0x00000]
+ at Mono.CSharp.Method.Emit () [0x00000]
+ at Mono.CSharp.TypeContainer.EmitType () [0x00000]
+ at Mono.CSharp.RootContext.EmitCode () [0x00000]
+ at Mono.CSharp.Driver.MainDriver (System.String[] args) [0x00000]
+ at Mono.CSharp.Driver.Main (System.String[] args) [0x00000]
More information about the mono-bugs
mailing list