[Mono-bugs] [Bug 572660] New: mono_metadata_decode_row assertion with System.Reflection.Emit circular array field type

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jan 21 08:29:36 EST 2010


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

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


           Summary: mono_metadata_decode_row assertion with
                    System.Reflection.Emit circular array field type
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: Other
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: rodrigobamboo at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US;
rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7

Using System.Reflection.Emit to emit code similar to:

  class Foo { 
   public Foo[] Foos;
  }

causes an assertion and runtime crash at mono_metadata_decode_row:

ERROR:metadata.c:965:mono_metadata_decode_row: assertion failed: (idx <
t->rows)
Stacktrace:



Reproducible: Always

Steps to Reproduce:
    [TestFixture]
    public class SreCircularArrayTypeTest
    {
        [Test]
        public void CircularArrayType()
        {
            var assemblyBuilder =
AppDomain.CurrentDomain.DefineDynamicAssembly(new AssemblyName("Test"),
AssemblyBuilderAccess.RunAndSave);
            var moduleBuilder = assemblyBuilder.DefineDynamicModule("Test",
"Test.dll", true);
            var typeBuilder = moduleBuilder.DefineType("Foo",
TypeAttributes.Public);
            var fieldBuilder = typeBuilder.DefineField("Foos",
typeBuilder.MakeArrayType(), FieldAttributes.Public);

            var fooType = typeBuilder.CreateType();
            Assert.AreSame(fooType.MakeArrayType(),
fooType.GetField("Foos").FieldType);
        }
    }
Actual Results:  
ERROR:metadata.c:965:mono_metadata_decode_row: assertion failed: (idx <
t->rows)
Stacktrace:


Expected Results:  
Test success.

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