[Mono-bugs] [Bug 592215] New: ** ERROR **: overrwritting old token 3

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Mar 30 06:21:37 EDT 2010


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

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


           Summary: ** ERROR **: overrwritting old token 3
    Classification: Mono
           Product: Mono: Runtime
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.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);



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

        itb.SetParent (typeof(ValueType));        



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

        ptb.SetParent (typeof(Enum));

        ptb.DefineField ("value__", itb,

                FieldAttributes.Public | FieldAttributes.SpecialName |
FieldAttributes.RTSpecialName);        



        Type[] constructorArgs = { ptb };

        ConstructorBuilder mb = tb.DefineConstructor(MethodAttributes.Public, 

                      CallingConventions.Standard, constructorArgs);



        il_gen = mb.GetILGenerator ();



        il_gen.Emit (OpCodes.Ret);



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

    }

}



** ERROR **: overrwritting old token 3 on image
MonoTests.System.Reflection.Emit.ILGeneratorTest for type ::TBase
aborting...
Stacktrace:

  at (wrapper managed-to-native)
System.Reflection.Emit.TypeBuilder.setup_internal_class
(System.Reflection.Emit.TypeBuilder*,System.Reflection.Emit.TypeBuilder)
<0x00004>
  at (wrapper managed-to-native)
System.Reflection.Emit.TypeBuilder.setup_internal_class
(System.Reflection.Emit.TypeBuilder*,System.Reflection.Emit.TypeBuilder)
<0x00004>
  at System.Reflection.Emit.TypeBuilder..ctor
(System.Reflection.Emit.ModuleBuilder,string,System.Reflection.TypeAttributes,System.Type,System.Type[],System.Reflection.Emit.PackingSize,int,System.Type)
<0x0014a>
  at System.Reflection.Emit.ModuleBuilder.DefineType
(string,System.Reflection.TypeAttributes,System.Type,System.Type[],System.Reflection.Emit.PackingSize,int)
<0x00039>
  at System.Reflection.Emit.ModuleBuilder.DefineType
(string,System.Reflection.TypeAttributes,System.Type,System.Type[]) <0x00020>
  at System.Reflection.Emit.ModuleBuilder.DefineType
(string,System.Reflection.TypeAttributes) <0x00043>
  at C.Main () <0x000b9>
  at (wrapper runtime-invoke) object.runtime_invoke_void
(object,intptr,intptr,intptr) <0x0003a>

Native stacktrace:

    mono [0x80d85d4]
    [0x9e8410]
    /lib/tls/i686/cmov/libc.so.6(abort+0x182) [0x274932]
    /lib/libglib-2.0.so.0 [0xcc5046]
    /lib/libglib-2.0.so.0(g_log+0x26) [0xcc5076]
    mono(mono_image_add_to_name_cache+0x95) [0x8120295]
    mono [0x818f10d]
    [0xa45f1c]
    [0xa49313]
    [0xa49142]
    [0xa490f1]
    [0xa490bc]
    [0x18d092]
    [0x18cf0b]
    mono [0x8064841]
    mono(mono_runtime_invoke+0x40) [0x813fb70]
    mono(mono_runtime_exec_main+0xd6) [0x8143246]
    mono(mono_runtime_run_main+0x112) [0x8146c32]
    mono(mono_main+0x1971) [0x80b68e1]
    mono [0x805b5a5]
    /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0x25db56]
    mono [0x805b4e1]

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