Bugzilla – Bug 313434
mono is unable to load assemblies with attributes containing arrays
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by pcgod@gmx.net 2003-12-22 13:28:34 MST ---- compile both files together with csc (mcs is currently unable to compile the testcase, see #52429) and the run it on mono. it will crash with an exception in mono_custom_attrs_construct. the problem is in mono/metadata/reflection.c in create_custom_attr. the specs say there is the type of the array after the array type (0x1d) which it not checked by the runtime. also attaching a patch which fixes the problem for me and it also fixes customattributebuilder to emit the correct il code (but i'm not sure that it uses the correct way to get the array type). additional information: i also wondered why data_type is checked for the value 0x55, according to specs there is no type with that number (or i overlooked it), but the code seems to be for the value for 0x50 (Type). ---- Additional Comments From pcgod@gmx.net 2003-12-22 13:29:29 MST ---- Created an attachment (id=165369) test.cs ---- Additional Comments From pcgod@gmx.net 2003-12-22 13:30:08 MST ---- Created an attachment (id=165370) XmlMemberArrayAttribute.cs ---- Additional Comments From pcgod@gmx.net 2003-12-22 13:30:52 MST ---- Created an attachment (id=165371) proposed patch ---- Additional Comments From vargaz@freemail.hu 2004-01-09 11:19:47 MST ---- Fixed in CVS. Thanks for the patch. Imported an attachment (id=165369) Imported an attachment (id=165370) Imported an attachment (id=165371)