Bug 317697 (MONO74609) - [PATCH] MonoTests.System.Reflection.Emit.MethodBuilderTest.TestDynamicParam
Summary: [PATCH] MonoTests.System.Reflection.Emit.MethodBuilderTest.TestDynamicParam
Status: RESOLVED FIXED
Alias: MONO74609
Product: Mono: Runtime
Classification: Mono
Component: misc (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Paolo Molaro
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-14 20:24 UTC by Jain Ankit
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
defval.patch (1.77 KB, patch)
2005-04-14 20:24 UTC, Thomas Wiest
Details | Diff
refl.patch (2.67 KB, patch)
2005-04-15 15:38 UTC, Thomas Wiest
Details | Diff
Patch.. updated. (removed an extra g_malloc) (2.62 KB, patch)
2005-04-15 15:42 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:13:25 UTC


---- Reported by radical@gmail.com 2005-04-14 13:24:29 MST ----

Patch for fixing the failing test case.

Basically, in case of SRE the types of default values are ignored, so the
patch adds a "guint32* param_default_types" to MethodReflectionMethodAux..
and sets it accordingly.



---- Additional Comments From radical@gmail.com 2005-04-14 13:24:54 MST ----

Created an attachment (id=167745)
defval.patch




---- Additional Comments From radical@gmail.com 2005-04-15 08:36:35 MST ----

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)



---- Additional Comments From radical@gmail.com 2005-04-15 08:38:00 MST ----

Created an attachment (id=167746)
refl.patch




---- Additional Comments From radical@gmail.com 2005-04-15 08:42:56 MST ----

Created an attachment (id=167747)
Patch.. updated. (removed an extra g_malloc)




---- Additional Comments From vargaz@gmail.com 2005-04-16 13:47:54 MST ----

Fixed in SVN. Thanks for the patch.

Imported an attachment (id=167745)
Imported an attachment (id=167746)
Imported an attachment (id=167747)

Unknown operating system unknown. Setting to default OS "Other".