[Mono-bugs] [Bug 460772] New: Crash in LINQ statement

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Dec 19 10:19:28 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=460772


           Summary: Crash in LINQ statement
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: rkvinge at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Repro:

using System;
using System.Linq;

class T {
        private delegate object D (object e);

        private static void Main ()
        {
                object o = from offset in new [] { 0 } select new D ( (f) => W
(f, offset) );
        }

        private static object W (object e, int offset)
        {
            return null;
        }

}

Result:
rolf at linux:~/test/linq> MONO_OPTIONS=--debug gmcs test.cs -r:System.Core.dll
Exception caught by the compiler while compiling:
   Block that caused the problem begin at: test.cs(9,72):
                     Block being compiled: [test.cs(9,78):,test.cs(9,92):]
System.Exception: Expression Mono.CSharp.LocalVariableReference did not set its
type after Resolve
called from: Mono.CSharp.LocalVariableReference
Exception caught by the compiler while compiling:
   Block that caused the problem begin at: test.cs(9,56):
                     Block being compiled: [test.cs(9,56):,Internal(1,1):]
Mono.CSharp.InternalErrorException: test.cs(9,72):
Exception caught by the compiler while compiling:
   Block that caused the problem begin at: test.cs(7,29):
                     Block being compiled: [test.cs(8,9):,test.cs(10,9):]
Mono.CSharp.InternalErrorException: test.cs(9,72):
Internal compiler error at test.cs(7,29):: exception caught while emitting
MethodBuilder [T::Main]

Unhandled Exception: Mono.CSharp.InternalErrorException: test.cs(9,72): --->
System.Exception: Expression Mono.CSharp.LocalVariableReference did not set its
type after Resolve
called from: Mono.CSharp.LocalVariableReference
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags
flags) [0x000f9] in /mono/main/src/mcs/mcs/ecore.cs:508 
  at Mono.CSharp.SimpleName.DoSimpleNameResolve (Mono.CSharp.EmitContext ec,
Mono.CSharp.Expression right_side, Boolean intermediate) [0x00062] in
/mono/main/src/mcs/mcs/ecore.cs:2620 
  at Mono.CSharp.SimpleName.SimpleNameResolve (Mono.CSharp.EmitContext ec,
Mono.CSharp.Expression right_side, Boolean intermediate) [0x00014] in
/mono/main/src/mcs/mcs/ecore.cs:2573 
  at Mono.CSharp.SimpleName.DoResolve (Mono.CSharp.EmitContext ec, Boolean
intermediate) [0x00000] in /mono/main/src/mcs/mcs/ecore.cs:2432 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags
flags) [0x00061] in /mono/main/src/mcs/mcs/ecore.cs:486 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000] in
/mono/main/src/mcs/mcs/ecore.cs:515 
  at Mono.CSharp.Argument.Resolve (Mono.CSharp.EmitContext ec, Location loc)
[0x00023] in /mono/main/src/mcs/mcs/expression.cs:4643 
  at Mono.CSharp.Invocation.DoResolve (Mono.CSharp.EmitContext ec) [0x00105] in
/mono/main/src/mcs/mcs/expression.cs:4806 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags
flags) [0x00075] in /mono/main/src/mcs/mcs/ecore.cs:488 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000] in
/mono/main/src/mcs/mcs/ecore.cs:515 
  at Mono.CSharp.Return.DoResolve (Mono.CSharp.EmitContext ec) [0x000ab] in
/mono/main/src/mcs/mcs/statement.cs:829 
  at Mono.CSharp.ContextualReturn.DoResolve (Mono.CSharp.EmitContext ec)
[0x0004e] in /mono/main/src/mcs/mcs/lambda.cs:205 
  at Mono.CSharp.ExitStatement.Resolve (Mono.CSharp.EmitContext ec) [0x00000]
in /mono/main/src/mcs/mcs/statement.cs:783 
  at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x000f0] in
/mono/main/src/mcs/mcs/statement.cs:2240 
  at Mono.CSharp.ExplicitBlock.Resolve (Mono.CSharp.EmitContext ec) [0x00000]
in /mono/main/src/mcs/mcs/statement.cs:2540 
  at Mono.CSharp.EmitContext.ResolveTopBlock (Mono.CSharp.EmitContext
anonymous_method_host, Mono.CSharp.ToplevelBlock block, Mono.CSharp.Parameters
ip, IMethodData md, System.Boolean& unreachable) [0x00087] in
/mono/main/src/mcs/mcs/codegen.cs:799 
  --- End of inner exception stack trace ---
  at Mono.CSharp.AnonymousMethodExpression.Compatible (Mono.CSharp.EmitContext
ec, System.Type type) [0x0009f] in /mono/main/src/mcs/mcs/anonymous.cs:1096 
  at Mono.CSharp.NewDelegate.DoResolve (Mono.CSharp.EmitContext ec) [0x00063]
in /mono/main/src/mcs/mcs/delegate.cs:926 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags
flags) [0x00075] in /mono/main/src/mcs/mcs/ecore.cs:488 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000] in
/mono/main/src/mcs/mcs/ecore.cs:515 
  at Mono.CSharp.New.DoResolve (Mono.CSharp.EmitContext ec) [0x000ad] in
/mono/main/src/mcs/mcs/expression.cs:5390 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags
flags) [0x00075] in /mono/main/src/mcs/mcs/ecore.cs:488 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000] in
/mono/main/src/mcs/mcs/ecore.cs:515 
  at Mono.CSharp.Return.DoResolve (Mono.CSharp.EmitContext ec) [0x000ab] in
/mono/main/src/mcs/mcs/statement.cs:829 
  at Mono.CSharp.ContextualReturn.DoResolve (Mono.CSharp.EmitContext ec)
[0x0004e] in /mono/main/src/mcs/mcs/lambda.cs:205 
  at Mono.CSharp.ExitStatement.Resolve (Mono.CSharp.EmitContext ec) [0x00000]
in /mono/main/src/mcs/mcs/statement.cs:783 
  at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x000f0] in
/mono/main/src/mcs/mcs/statement.cs:2240 
  at Mono.CSharp.ExplicitBlock.Resolve (Mono.CSharp.EmitContext ec) [0x00000]
in /mono/main/src/mcs/mcs/statement.cs:2540 
  at Mono.CSharp.EmitContext.ResolveTopBlock (Mono.CSharp.EmitContext
anonymous_method_host, Mono.CSharp.ToplevelBlock block, Mono.CSharp.Parameters
ip, IMethodData md, System.Boolean& unreachable) [0x00087] in
/mono/main/src/mcs/mcs/codegen.cs:799


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list