[Mono-bugs] [Bug 52451][Nor] New - mono is unable to load assemblies with attributes containing arrays
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Mon, 22 Dec 2003 13:28:34 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by pcgod@gmx.net.
http://bugzilla.ximian.com/show_bug.cgi?id=52451
--- shadow/52451 2003-12-22 13:28:34.000000000 -0500
+++ shadow/52451.tmp.8156 2003-12-22 13:28:34.000000000 -0500
@@ -0,0 +1,34 @@
+Bug#: 52451
+Product: Mono/Runtime
+Version: unspecified
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity: Unknown
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: pcgod@gmx.net
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: mono is unable to load assemblies with attributes containing arrays
+
+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).