[Mono-bugs] [Bug 461256] New: Runtime crash with the following sample

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Dec 20 21:41:41 EST 2008


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


           Summary: Runtime crash with the following sample
           Product: Mono: Runtime
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: JIT
        AssignedTo: lupus at novell.com
        ReportedBy: miguel at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


The following program crashes the runtime with:

System.Array.InternalEnumerator<ICode> doesn't implement interface
System.Collections.Generic.IEnumerator<System.Object>
**
** ERROR:(mini-trampolines.c:67):mono_convert_imt_slot_to_vtable_slot: code
should not be reached
Stacktrace:


using System.Linq;
using System.Reflection;

public interface ICode
{
        string Code { get; }
}

public class LanguageCodeAttribute : Attribute, ICode
{
        public string Code { get; private set; }

        public LanguageCodeAttribute (string code)
        {
                Code = code;
        }
}

public enum Languages
{
        [LanguageCode ("en")]
        English
}

static class Program
{
        static bool Predicate (MemberInfo info, string code)
        {
                return info.GetCustomAttributes (typeof (ICode), false).
                        Any (x => ((ICode) x).Code == code);
        }

        public static void GetMember  (string code)
                {
                        MemberInfo info = typeof (Languages).GetMembers ().
                                Single (x => Predicate (x, code));
                }

        public static void Main ()
        {
                GetMember ("en");
        }
}


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list