[Mono-bugs] [Bug 536243] New: SRE: Missing Label content check

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Sep 2 07:49:53 EDT 2009


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: rkumpera at novell.com
        ReportedBy: msafar at novell.com
         QAContact: mono-bugs at lists.ximian.com
          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.


More information about the mono-bugs mailing list