[Mono-bugs] [Bug 472692] New: invoking method info for virtual generic method in generic class crashes vm

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Feb 4 19:05:06 EST 2009


           Summary: invoking method info for virtual generic method in
                    generic class crashes vm
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.4.x
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: generics
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: basjsmit at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:
Gecko/2009011913 Firefox/3.0.6

When tryin to get the Moq Test suite to run on mono, I encountered a VM crash.
I reduced the code to the following.

public class Program
    static void Main()
        var t = new Foo<object>();
        var asMethod = t.GetType().GetMethod("Bar");
        var asInterface = asMethod.MakeGenericMethod(typeof(object));
        var asMock = asInterface.Invoke(t, null);

public class Foo<T>
    public virtual Helper<TInt> Bar<TInt>()
        return new Helper<TInt>();

public class Helper<T> { }

Reproducible: Always

Steps to Reproduce:
1.Compile the code included in the details section.
2.Run resulting executable.
Actual Results:  
Assertion Failed

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