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


           Summary: SRE: Missing Label content check
    Classification: Mono
           Product: Mono: Class Libraries
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---


compile & run

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.Run);



        ModuleBuilder module = assembly.DefineDynamicModule ("module1");

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



        MethodBuilder mb = tb.DefineMethod("F",

            MethodAttributes.Public, typeof(string), null);

        il_gen = mb.GetILGenerator ();



        il_gen.DefineLabel ();

        object o = new Label ();

        il_gen.Emit (OpCodes.Leave, (Label) o);



        tb.CreateType ();

    }

}


Mono:

No error.

NET

Unhandled Exception: System.ArgumentException: Bad label content in
ILGenerator.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to