Bug 321800 (MONO79088) - [GMCS] crash while checking constraints
Summary: [GMCS] crash while checking constraints
Status: RESOLVED FIXED
Alias: MONO79088
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Major
Target Milestone: ---
Assignee: Martin Baulig
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords: dogfood
Depends on:
Blocks:
 
Reported: 2006-08-16 21:58 UTC by Mike Allen
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 20:06:28 UTC


---- Reported by mike.allen@durrusa.com 2006-08-16 14:58:10 MST ----

Description of Problem:

Get an unhandled System.NullReferenceException when compiling this simple
example:

test.cs:

namespace Test {
    public class A <TA, TB> where TA: A <TA, TB> where TB: B <TA, TB> {
    }
    public class B <TA, TB> where TA: A <TA, TB> where TB: B <TA, TB> {
    }
}

Steps to reproduce the problem:
1. Compile using the command:

    gmcs -target:library -warn:4 -warnaserror test.cs
2. Er...
3. That's it!

Actual Results:

Unhandled Exception: System.NullReferenceException: Object reference not
set to an instance of an object
in <0x00376> Mono.CSharp.ConstraintChecker:CheckConstraints
(Mono.CSharp.EmitContext ec, Int32 index)
in <0x00018> Mono.CSharp.ConstraintChecker:CheckConstraints
(Mono.CSharp.EmitContext ec)
in <0x00035> Mono.CSharp.ConstraintChecker:CheckConstraints
(Mono.CSharp.EmitContext ec, System.Type gt, System.Type[] gen_params,
System.Type[] atypes, Location loc)
in <0x0001a> Mono.CSharp.ConstructedType:CheckConstraints
(Mono.CSharp.EmitContext ec)
in <0x0016c> Mono.CSharp.Expression:ResolveAsTypeTerminal
(Mono.CSharp.EmitContext ec, Boolean silent)
in <0x00010> Mono.CSharp.Expression:ResolveAsTypeTerminal
(Mono.CSharp.EmitContext ec)
in <0x0001c> Mono.CSharp.TypeExpr:ResolveType (Mono.CSharp.EmitContext ec)
in <0x004af> Mono.CSharp.Constraints:ResolveTypes (Mono.CSharp.EmitContext ec)
in <0x0001d> Mono.CSharp.TypeParameter:ResolveType (Mono.CSharp.EmitContext ec)
in <0x0003f> Mono.CSharp.TypeParameter:DefineType (Mono.CSharp.EmitContext
ec, System.Reflection.Emit.MethodBuilder builder,
System.Reflection.MethodInfo implementing, Boolean is_override)
in <0x00013> Mono.CSharp.TypeParameter:DefineType (Mono.CSharp.EmitContext ec)
in <0x002cc> Mono.CSharp.TypeContainer:ResolveType ()
in <0x000d3> Mono.CSharp.RootContext:PopulateTypes ()
in <0x009b1> Mono.CSharp.Driver:MainDriver (System.String[] args)
in <0x00051> Mono.CSharp.Driver:Main (System.String[] args)

Expected Results:

Clean compile with no errors.

How often does this happen? 

Every time.

Additional Information:

Compiles clean using Microsoft C# compiler with same options.



---- Additional Comments From martin@ximian.com 2006-10-09 09:12:18 MST ----

I can't reproduce this.



---- Additional Comments From mike.allen@durrusa.com 2006-10-09 10:11:33 MST ----

Did you use the same GMCS version (1.1.13.6) I did?  If not, which
version did you use?  This bug is a showstopper for me right now, so
if you have a version that works, I'll use it.



---- Additional Comments From mike.allen@durrusa.com 2006-10-27 17:26:32 MST ----

Since the Mono team have been a little, er, slow, replying to my 
previous question, here's some follow up:

The test program compiles clean with gmcs version 1.1.17.1 
(available with Ubuntu 6.10 for those who are interested).


Unknown bug field "cf_op_sys_details" encountered while moving bug
   <cf_op_sys_details>Ububtu 6.06</cf_op_sys_details>
Unknown bug field "cf_version_details" encountered while moving bug
   <cf_version_details>1.1.13.6-0ubuntu3</cf_version_details>
Unknown operating system unknown. Setting to default OS "Other".