[Mono-bugs] [Bug 475965] New: Compiler crash while implementing a Linq Provider

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Feb 14 11:17:59 EST 2009


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


           Summary: Compiler crash while implementing a Linq Provider
    Classification: Mono
           Product: Mono: Compilers
           Version: unspecified
          Platform: PC
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: catanzariti at yahoo.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9.0.6)
Gecko/2009020911 Ubuntu/8.10 (intrepid) Firefox/3.0.6

This the class to compile (C# 3.0)
using System;
using System.Linq;
using System.Linq.Expressions;
using System.Collections.Generic;

namespace CompilerCrashTest
{
    public static class QueryCompiler
    {

        public static D Compile<D>(Expression<D> query)
        {
            return (D)(object)Compile((LambdaExpression)query);
        }

        public static Delegate Compile(LambdaExpression query)
        {
            throw new NotImplementedException();
        }
    }
}

This is the error displayed :

Exécution de la compilation principale...
/opt/mono/bin/gmcs
"/out:/home/michael/dev/CompilerCrashTest/bin/Debug/CompilerCrashTest.exe"
"/r:System.Core.dll" /noconfig /nologo /warn:4 /debug:+ /debug:full /optimize-
/codepage:utf8 /define:"DEBUG" /t:exe
"/home/michael/dev/CompilerCrashTest/Main.cs"
"/home/michael/dev/CompilerCrashTest/AssemblyInfo.cs"
"/home/michael/dev/CompilerCrashTest/QueryCompiler.cs" 
Exception caught by the compiler while compiling:
   Block that caused the problem begin at:
/home/michael/dev/CompilerCrashTest/QueryCompiler.cs(11,25):
                     Block being compiled:
[/home/michael/dev/CompilerCrashTest/QueryCompiler.cs(12,9):,/home/michael/dev/CompilerCrashTest/QueryCompiler.cs(14,9):]
System.NullReferenceException: Object reference not set to an instance of an
object
Internal compiler error at
/home/michael/dev/CompilerCrashTest/QueryCompiler.cs(11,25):: exception caught
while emitting MethodBuilder [QueryCompiler::Compile]


Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object
  at Mono.CSharp.TypeInferenceContext.FixIndependentTypeArguments
(System.Type[] methodParameters, System.Boolean& fixed_any) [0x00000] 
  at Mono.CSharp.TypeInferenceV3.InferInPhases (Mono.CSharp.EmitContext ec,
Mono.CSharp.TypeInferenceContext tic, Mono.CSharp.AParametersCollection
methodParameters) [0x00000] 
  at Mono.CSharp.TypeInferenceV3.InferMethodArguments (Mono.CSharp.EmitContext
ec, System.Reflection.MethodBase method) [0x00000] 
  at Mono.CSharp.TypeManager.InferTypeArguments (Mono.CSharp.EmitContext ec,
System.Collections.ArrayList arguments, System.Reflection.MethodBase& method)
[0x00000] 
  at Mono.CSharp.MethodGroupExpr.IsApplicable (Mono.CSharp.EmitContext ec,
System.Collections.ArrayList arguments, Int32 arg_count,
System.Reflection.MethodBase& method, System.Boolean& params_expanded_form)
[0x00000] 
  at Mono.CSharp.MethodGroupExpr.OverloadResolve (Mono.CSharp.EmitContext ec,
System.Collections.ArrayList& Arguments, Boolean may_fail, Location loc)
[0x00000] 
  at Mono.CSharp.Invocation.DoResolveOverload (Mono.CSharp.EmitContext ec)
[0x00000] 
  at Mono.CSharp.Invocation.DoResolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags
flags) [0x00000] 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.Cast.DoResolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags
flags) [0x00000] 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.Cast.DoResolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags
flags) [0x00000] 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.Return.DoResolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.ExitStatement.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.ParametersCompiled ip, IMethodData md, System.Boolean& unreachable)
[0x00000] 


Reproducible: Always

Steps to Reproduce:
1.
2.
3.

-- 
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