[Mono-bugs] [Bug 591788] ERROR:class.c:5420:mono_class_from_mono_type: code should not be reached

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Mar 30 06:00:14 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=591788

http://bugzilla.novell.com/show_bug.cgi?id=591788#c2


Marek Safar <msafar at novell.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #2 from Marek Safar <msafar at novell.com> 2010-03-30 10:00:12 UTC ---
This still aborts with slightly modified test case

using System;

using System.Threading;

using System.Reflection;

using System.Reflection.Emit;



class C

{

    public static void Main ()

    {

        TypeBuilder tb;

        ILGenerator il_gen;



        AssemblyName assemblyName = new AssemblyName ();

        assemblyName.Name = "MonoTests.System.Reflection.Emit.ILGeneratorTest";



        AssemblyBuilder assembly = Thread.GetDomain ().DefineDynamicAssembly (

            assemblyName, AssemblyBuilderAccess.RunAndSave);





        ModuleBuilder module =
assembly.DefineDynamicModule("bug-sre-test.exe");



        tb = module.DefineType ("T", TypeAttributes.Public);

        var tb2 = module.DefineType ("TBase", TypeAttributes.Public);

        tb2.SetParent (typeof (ValueType));



        tb.SetParent (tb2);



        Type[] constructorArgs = { tb };

        ConstructorBuilder mb = tb.DefineConstructor(MethodAttributes.Public, 

                      CallingConventions.Standard, constructorArgs);



        il_gen = mb.GetILGenerator ();



        il_gen.Emit (OpCodes.Ret);



        new CustomAttributeBuilder (mb, new object [] { 200000 });

    }

}

-- 
Configure bugmail: http://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