[Mono-bugs] [Bug 82402][Wis] New - [GMCS]
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri Aug 10 14:56:01 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 grompf at sublimeintervention.com.
http://bugzilla.ximian.com/show_bug.cgi?id=82402
--- shadow/82402 2007-08-10 14:56:01.000000000 -0400
+++ shadow/82402.tmp.32064 2007-08-10 14:56:01.000000000 -0400
@@ -0,0 +1,81 @@
+Bug#: 82402
+Product: Mono: Compilers
+Version: 1.2
+OS: other
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: grompf at sublimeintervention.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: [GMCS]
+
+The following code crashes GMCS with the following exception:
+
+Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of
+an object
+ at Mono.CSharp.ConstructedType..ctor (System.Type t, Mono.CSharp.TypeParameter[]
+type_params, Location l) [0x00000]
+ at Mono.CSharp.TypeContainer.DoResolveType () [0x00000]
+ at Mono.CSharp.TypeContainer.ResolveType () [0x00000]
+ at Mono.CSharp.TypeContainer.ResolveType () [0x00000]
+ at Mono.CSharp.RootScopeInfo.LinkScopes () [0x00000]
+ at Mono.CSharp.ToplevelBlock.CompleteContexts (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]
+
+--code--
+using System;
+using System.Threading;
+
+public delegate void VoidHandler();
+public delegate TResult ResultHandler<TResult>();
+
+class Result <T>{
+ public Result () {}
+}
+
+class TaskBehaviour {
+ public Exception Execute (VoidHandler handler) {
+ return new Exception ();
+ }
+}
+
+class GmcsCrash {
+ static Result<TResult> Fork<TResult> (ResultHandler <TResult> handler, Result <TResult>
+result) {
+ if (handler == null) {
+ throw new Exception ("null");
+ }
+
+ TaskBehaviour behaviour = new TaskBehaviour ();
+
+ ThreadPool.QueueUserWorkItem (delegate (object unused) {
+ try {
+ TResult response = default (TResult);
+ Exception exception = behaviour.Execute (delegate () {
+ response = handler ();
+ });
+ } catch (Exception e) {
+ } finally {
+ }
+ });
+
+ return result;
+ }
+}
More information about the mono-bugs
mailing list