[Mono-bugs] [Bug 591800] New: SIGSEGV in CustomAttributeBuilder

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Mar 29 05:30:09 EDT 2010


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

http://bugzilla.novell.com/show_bug.cgi?id=591800#c0


           Summary: SIGSEGV in CustomAttributeBuilder
    Classification: Mono
           Product: Mono: Runtime
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: misc
        AssignedTo: rkumpera at novell.com
        ReportedBy: msafar at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


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


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

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

        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 });
    }
}




Stacktrace:

  at (wrapper managed-to-native)
System.Reflection.Emit.CustomAttributeBuilder.GetBlob
(System.Reflection.Assembly,System.Reflection.ConstructorInfo,object[],System.Reflection.PropertyInfo[],object[],System.Reflection.FieldInfo[],object[])
<0x00004>
  at (wrapper managed-to-native)
System.Reflection.Emit.CustomAttributeBuilder.GetBlob
(System.Reflection.Assembly,System.Reflection.ConstructorInfo,object[],System.Reflection.PropertyInfo[],object[],System.Reflection.FieldInfo[],object[])
<0x00004>
  at System.Reflection.Emit.CustomAttributeBuilder.Initialize
(System.Reflection.ConstructorInfo,object[],System.Reflection.PropertyInfo[],object[],System.Reflection.FieldInfo[],object[])
<0x00621>
  at System.Reflection.Emit.CustomAttributeBuilder..ctor
(System.Reflection.ConstructorInfo,object[]) <0x0007c>
  at C.Main () <0x00194>
  at (wrapper runtime-invoke) object.runtime_invoke_void
(object,intptr,intptr,intptr) <0x0003a>

Native stacktrace:

    mono [0x80d7da4]
    mono [0x8115c3b]
    [0xdbf410]
    mono(mono_reflection_get_custom_attrs_blob+0x13f) [0x819beaf]
    [0xaf2de7]
    [0xaf1f72]
    [0xaf193d]
    [0x96916d]
    [0x968f0b]
    mono [0x8063e31]
    mono(mono_runtime_invoke+0x40) [0x813e8d0]
    mono(mono_runtime_exec_main+0xd6) [0x8141f26]
    mono(mono_runtime_run_main+0x112) [0x8145962]
    mono(mono_main+0x1949) [0x80b6559]
    mono [0x805b615]
    /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0x1aab56]
    mono [0x805b551]

-- 
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