Bug 321169 (MONO78431) - [GMCS] Runtime screams about invalid IL in generic code
Summary: [GMCS] Runtime screams about invalid IL in generic code
Status: RESOLVED FIXED
Alias: MONO78431
Product: Mono: Runtime
Classification: Mono
Component: misc (show other bugs)
Version: 1.0
Hardware: Other Other
: P3 - Medium : Major
Target Milestone: ---
Assignee: Paolo Molaro
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-17 20:35 UTC by Kamil Skalski
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 19:59:13 UTC


---- Reported by nazgul@omega.pl 2006-05-17 13:35:53 MST ----

Please fill in this template when reporting a bug, unless you know what you
are doing.
Description of Problem:


Steps to reproduce the problem:
1. Compile and run


  public class Pair <T> { 
    public T fst; 
    public T snd; 
  }
  
  public class RList <T>  {
    public class Nil : RList <T> {}
    public class Zero : RList <T> { 
      public RList <Pair <T> > arg;
    }

    static int _Length (RList <T> xs) {
      if (xs is Zero)
        return RList <Pair <T> >._Length (((Zero)xs).arg);
      else
        return 0;
    }
    public int Length  {
      get { 
        return _Length (this);
      }
    }    
  }


class M { 
  public static void Main() {
    int x = (new RList<object>.Nil()).Length;
  }
}


Actual Results:
Unhandled Exception: System.InvalidProgramException: Invalid IL code in
RList`1:_Length (RList`1): IL_0016: call      0x0a000003


in <0x00000> <unknown method>
in <0x0000b> RList`1[System.Object]:get_Length ()
in <0x00029> M:Main ()


Expected Results:
Clear run

How often does this happen? 
Always, it worked in mono 1.1.13

Additional Information:



---- Additional Comments From miguel@ximian.com 2006-07-15 16:25:57 MST ----

Another verifier bug. 



---- Additional Comments From lupus@ximian.com 2007-01-18 12:23:34 MST ----

Fixed in svn, thanks for the test case.


Unknown operating system unknown. Setting to default OS "Other".