|
Bugzilla – Full Text Bug Listing |
| Summary: | mono_metadata_decode_row assertion with System.Reflection.Emit circular array field type | ||
|---|---|---|---|
| Product: | [Mono] Mono: Runtime | Reporter: | Rodrigo Oliveira <rodrigobamboo> |
| Component: | misc | Assignee: | Mono Bugs <mono-bugs> |
| Status: | RESOLVED FIXED | QA Contact: | Mono Bugs <mono-bugs> |
| Severity: | Normal | ||
| Priority: | P5 - None | ||
| Version: | 2.6.x | ||
| Target Milestone: | 2.6.x | ||
| Hardware: | Other | ||
| OS: | Mac OS X 10.5 | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
Runtime bug. Will work on it. Fixed trunk in r150008 and 2.6 in r150011. |
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.