[Mono-bugs] [Bug 80263][Nor] Changed - Invalid string array encoding in Reflection.Emit
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Jan 4 15:50:19 EST 2007
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 miguel at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=80263
--- shadow/80263 2006-12-29 20:53:55.000000000 -0500
+++ shadow/80263.tmp.31126 2007-01-04 15:50:19.000000000 -0500
@@ -11,13 +11,13 @@
AssignedTo: lupus at ximian.com
ReportedBy: dmitchell at logos.com
QAContact: mono-bugs at ximian.com
TargetMilestone: ---
URL:
Cc:
-Summary: Getting custom attributes when one attribute was initialized with a params array that includes a string array crashes the runtime
+Summary: Invalid string array encoding in Reflection.Emit
Please fill in this template when reporting a bug, unless you know what
you are doing.
Description of Problem:
Under certain circumstances, calling MethodInfo.GetCustomAttributes() can
crash the runtime
@@ -135,6 +135,31 @@
appropriate permissions would test my fix (the code in the initial example should compile
and run correctly after applying the patch) and enter it into the repository.
------- Additional Comments From robertj at gmx.net 2006-12-17 14:14 -------
--> runtime
+
+------- Additional Comments From miguel at ximian.com 2007-01-04 15:50 -------
+The bug is indeed in our runtime.
+
+The above program when compiled with CSC works on Mono.
+The above program when compiled with MCS in .NET works on Mono/.NET
+The above program when compiled with MCS on Mono fails on Mono/.NET
+
+The .NET output is:
+
+Unhandled Exception: System.Reflection.CustomAttributeFormatException:
+Binary format of the specified custom attribute was invalid.
+ at System.Reflection.CustomAttribute.CreateCAObject(Int32& propNum,
+Assembly& assembly)
+ at System.Reflection.CustomAttribute.GetObject()
+ at
+System.Reflection.CustomAttribute.CheckConsistencyAndCreateArray(CustomAttribute
+caItem, Type caType)
+ at System.Reflection.CustomAttribute.GetCustomAttributes(MemberInfo
+member, Type caType, Boolean inherit)
+ at System.Reflection.RuntimeMethodInfo.GetCustomAttributes(Boolean
+inherit)
+ at MonoBug.Program.Main(String[] args)
+
+
More information about the mono-bugs
mailing list