[Mono-bugs] [Bug 469019] New: compiler crash dealing with certain generic method parameters (NullReferenceException in Mono.CSharp.TypeParameterExpr.ResolveAsTypeStep)

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jan 23 16:45:03 EST 2009


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


           Summary: compiler crash dealing with certain generic method
                    parameters (NullReferenceException in
                    Mono.CSharp.TypeParameterExpr.ResolveAsTypeStep)
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.2.x
          Platform: x86-64
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: casey.s.marshall at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=267416)
 --> (https://bugzilla.novell.com/attachment.cgi?id=267416)
Test case.

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.5)
Gecko/2008121622 Ubuntu/8.04 (hardy) Firefox/3.0.5

gmcs crashes when attempting to compile the given test case.

Reproducible: Always

Steps to Reproduce:
1. Run `gmcs -target:library test.cs'
2.
3.
Actual Results:  
Exception caught by the compiler while emitting:
   Block that caused the problem begin at: test.cs(11,17):
System.NullReferenceException: Object reference not set to an instance of an
object
Internal compiler error at test.cs(10,32):: exception caught while emitting
MethodBuilder [B::W]

Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object
  at Mono.CSharp.TypeParameterExpr.ResolveAsTypeStep (IResolveContext ec,
Boolean silent) [0x00000] in
/home/cmarshall/Source/mono-2.2/mcs/mcs/generic.cs:1055 
  at Mono.CSharp.Expression.ResolveAsBaseTerminal (IResolveContext ec, Boolean
silent) [0x00006] in /home/cmarshall/Source/mono-2.2/mcs/mcs/ecore.cs:306 
  at Mono.CSharp.Expression.ResolveAsTypeTerminal (IResolveContext ec, Boolean
silent) [0x00000] in /home/cmarshall/Source/mono-2.2/mcs/mcs/ecore.cs:274 
  at Mono.CSharp.TypeArguments.Resolve (IResolveContext ec) [0x00021] in
/home/cmarshall/Source/mono-2.2/mcs/mcs/generic.cs:1170 
  at Mono.CSharp.ConstructedType.DoResolveType (IResolveContext ec) [0x00000]
in /home/cmarshall/Source/mono-2.2/mcs/mcs/generic.cs:1343 
  at Mono.CSharp.ConstructedType.ResolveConstructedType (IResolveContext ec)
[0x00018] in /home/cmarshall/Source/mono-2.2/mcs/mcs/generic.cs:1315 
  at Mono.CSharp.ConstructedType.DoResolveAsTypeStep (IResolveContext ec)
[0x00000] in /home/cmarshall/Source/mono-2.2/mcs/mcs/generic.cs:1291 
  at Mono.CSharp.TypeExpr.ResolveAsTypeStep (IResolveContext ec, Boolean
silent) [0x00000] in /home/cmarshall/Source/mono-2.2/mcs/mcs/ecore.cs:2840 
  at Mono.CSharp.Expression.ResolveAsBaseTerminal (IResolveContext ec, Boolean
silent) [0x00006] in /home/cmarshall/Source/mono-2.2/mcs/mcs/ecore.cs:306 
  at Mono.CSharp.Expression.ResolveAsTypeTerminal (IResolveContext ec, Boolean
silent) [0x00000] in /home/cmarshall/Source/mono-2.2/mcs/mcs/ecore.cs:274 
  at Mono.CSharp.New.DoResolve (Mono.CSharp.EmitContext ec) [0x00024] in
/home/cmarshall/Source/mono-2.2/mcs/mcs/expression.cs:5423 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags
flags) [0x00075] in /home/cmarshall/Source/mono-2.2/mcs/mcs/ecore.cs:488 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000] in
/home/cmarshall/Source/mono-2.2/mcs/mcs/ecore.cs:515 
  at Mono.CSharp.AnonymousMethodStorey.EmitHoistedVariables
(Mono.CSharp.EmitContext ec) [0x000ec] in
/home/cmarshall/Source/mono-2.2/mcs/mcs/anonymous.cs:285 
  at Mono.CSharp.ExplicitBlock.Emit (Mono.CSharp.EmitContext ec) [0x0000b] in
/home/cmarshall/Source/mono-2.2/mcs/mcs/statement.cs:2493 
  at Mono.CSharp.ToplevelBlock.Emit (Mono.CSharp.EmitContext ec) [0x00000] in
/home/cmarshall/Source/mono-2.2/mcs/mcs/statement.cs:2923 
  at Mono.CSharp.EmitContext.EmitResolvedTopBlock (Mono.CSharp.ToplevelBlock
block, Boolean unreachable) [0x00006] in
/home/cmarshall/Source/mono-2.2/mcs/mcs/codegen.cs:850 
  at Mono.CSharp.EmitContext.EmitTopBlock (IMethodData md,
Mono.CSharp.ToplevelBlock block) [0x00037] in
/home/cmarshall/Source/mono-2.2/mcs/mcs/codegen.cs:755

Expected Results:  
Source is compiled normally.

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