Bug 318703 (MONO75772) - [PACH] GMCS throws exception when compiling struct with pointers inside generic type
Summary: [PACH] GMCS throws exception when compiling struct with pointers inside gener...
Status: RESOLVED FIXED
Alias: MONO75772
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-10 20:59 UTC by Jan Oravec
Modified: 2007-09-15 21:24 UTC (History)
1 user (show)

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


Attachments
proposed fix (768 bytes, patch)
2005-09-02 15:30 UTC, Thomas Wiest
Details | Diff

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


---- Reported by jan.oravec@6com.sk 2005-08-10 13:59:07 MST ----

Description of Problem:

GMCS throws exception when compiling this code:

public class Splay<T>
{
  unsafe private struct Node
  {
    private Node *            left, right;
    private Node *            parent;
    
    private T                 data;
  } 
}



Steps to reproduce the problem:
1. gmcs -unsafe splay.cs

Actual Results:
Unhandled Exception: Mono.CSharp.InternalErrorException: Couldn't create
computed type Splay`1+Node<T>*
in <0x003a8> Mono.CSharp.ComposedCast:DoResolveAsTypeStep
(Mono.CSharp.EmitContext ec)
in <0x00025> Mono.CSharp.TypeExpr:ResolveAsTypeStep
(Mono.CSharp.EmitContext ec)
in <0x0003b> Mono.CSharp.Expression:ResolveAsTypeTerminal
(Mono.CSharp.EmitContext ec)
in <0x00092> Mono.CSharp.MemberBase:get_MemberType ()
in <0x0003b> Mono.CSharp.FieldMember:Define ()
in <0x00030> Mono.CSharp.Field:Define ()
in <0x00097>
Mono.CSharp.TypeContainer+MemberCoreArrayList:DefineContainerMembers ()
in <0x00021> Mono.CSharp.TypeContainer:DefineContainerMembers
(Mono.CSharp.MemberCoreArrayList mcal)
in <0x003e1> Mono.CSharp.TypeContainer:DoDefineMembers ()
in <0x00039> Mono.CSharp.TypeContainer:DefineMembers
(Mono.CSharp.TypeContainer container)
in <0x0031f> Mono.CSharp.RootContext:PopulateTypes ()
in <0x00d64> Mono.CSharp.Driver:MainDriver (System.String[] args)
in <0x00025> Mono.CSharp.Driver:Main (System.String[] args)


Expected Results:
Compile successfully


How often does this happen? 
Always

Additional Information:
Using dev-lang/mono-1.1.8.3 on Gentoo Linux



---- Additional Comments From atsushi@ximian.com 2005-09-02 08:30:23 MST ----

Created an attachment (id=168341)
proposed fix




---- Additional Comments From martin@ximian.com 2005-09-05 11:36:46 MST ----

Patch is ok, already tested.



---- Additional Comments From atsushi@ximian.com 2005-09-05 13:42:30 MST ----

Fixed in svn (r49485).



---- Additional Comments From jan.oravec@6com.sk 2005-09-05 14:06:32 MST ----

Thanks a lot!

Imported an attachment (id=168341)

Unknown bug field "cf_op_sys_details" encountered while moving bug
   <cf_op_sys_details>Gentoo</cf_op_sys_details>
Unknown operating system unknown. Setting to default OS "Other".