[Mono-bugs] [Bug 518675] New: compiler crash against code that incorrectly lacks "new" for constructor

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jul 2 07:57:39 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=518675


           Summary: compiler crash against code that incorrectly lacks
                    "new" for constructor
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: aenomoto at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


The following code causes gmcs crash (compile it with -pkg:wcf):

using System;
using System.ServiceModel;
using System.ServiceModel.PeerResolvers;

public class Test
{
        public static void Main ()
        {
                ChannelFactory<IPeerResolverContract> ().CreateChannel (
                        new BasicHttpBinding (),
                        new EndpointAddress ("http://localhost:8931"));
        }
}

----

Actual result:

gmcs test.cs -pkg:wcf
Internal compiler error at test.cs(7,28):: exception caught while emitting
Metho
dBuilder [Test::Main]

Unhandled Exception: System.InvalidOperationException: Operation is not valid
du
e to the current state of the object
  at System.MonoType.GetGenericTypeDefinition () [0x00000]
  at Mono.CSharp.GenericTypeExpr..ctor (System.Type t,
Mono.CSharp.TypeArguments
 args, Location l) [0x00000]
  at Mono.CSharp.SimpleName.ResolveAsTypeStep (IResolveContext ec, Boolean
silen
t) [0x00000]
  at Mono.CSharp.SimpleName.DoSimpleNameResolve (Mono.CSharp.EmitContext ec,
Mon
o.CSharp.Expression right_side, Boolean intermediate) [0x00000]
  at Mono.CSharp.SimpleName.SimpleNameResolve (Mono.CSharp.EmitContext ec,
Mono.
CSharp.Expression right_side, Boolean intermediate) [0x00000]
  at Mono.CSharp.SimpleName.DoResolve (Mono.CSharp.EmitContext ec, Boolean
inter
mediate) [0x00000]
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags
fl
ags) [0x00000]
  at Mono.CSharp.Invocation.DoResolve (Mono.CSharp.EmitContext ec) [0x00000]
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags
fl
ags) [0x00000]
  at Mono.CSharp.MemberAccess.DoResolve (Mono.CSharp.EmitContext ec,
Mono.CSharp
Expression right_side) [0x00000]
  at Mono.CSharp.MemberAccess.DoResolve (Mono.CSharp.EmitContext ec) [0x00000]
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags
fl
ags) [0x00000]
  at Mono.CSharp.Invocation.DoResolve (Mono.CSharp.EmitContext ec) [0x00000]
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags
fl
ags) [0x00000]
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000]
  at Mono.CSharp.ExpressionStatement.ResolveStatement (Mono.CSharp.EmitContext
e
c) [0x00000]
  at Mono.CSharp.StatementExpression.Resolve (Mono.CSharp.EmitContext ec)
[0x000
00]
  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]
  at Mono.CSharp.EmitContext.EmitTopBlock (IMethodData md,
Mono.CSharp.ToplevelB
lock block) [0x00000]
  at Mono.CSharp.MethodData.Emit (Mono.CSharp.DeclSpace parent) [0x00000]
  at Mono.CSharp.MethodOrOperator.Emit () [0x00000]
  at Mono.CSharp.Method.Emit () [0x00000]

-- 
Configure bugmail: http://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