[Mono-bugs] [Bug 74609][Wis] Changed - [PATCH] MonoTests.System.Reflection.Emit.MethodBuilderTest.TestDynamicParam

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 15 Apr 2005 08:36:35 -0400 (EDT)


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 radical@gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=74609

--- shadow/74609	2005-04-14 13:24:54.000000000 -0400
+++ shadow/74609.tmp.14114	2005-04-15 08:36:35.000000000 -0400
@@ -1,14 +1,14 @@
 Bug#: 74609
 Product: Mono: Runtime
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Wishlist
 Component: misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: radical@gmail.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -23,6 +23,21 @@
 and sets it accordingly.
 
 ------- Additional Comments From radical@gmail.com  2005-04-14 13:24 -------
 Created an attachment (id=14938)
 defval.patch
 
+
+------- Additional Comments From radical@gmail.com  2005-04-15 08:36 -------
+The line 'm->signature->params [i -1]->attrs = pb->attrs' in
+reflection_methodbuilder_to_mono_method, assumes that the following
+invariant holds: 
+params [i - 1] does not point to the 'byval_arg' of any MonoClass.
+
+This is true for signatures of reflected methods.  It is not true for
+dynamic methods.  So, the second part of the patch ensures this
+invariant in parameters_to_signature. It is better to ensure the
+invariant in parameters_to_signature, since we don't want to
+needlessly allocate another MonoType* in
+reflection_methodbuilder_to_mono_method.
+
+(Fixed by Hari)