[Mono-bugs] [Bug 656004] New: cecil/light PropertyDefinition caching issue
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Nov 25 13:49:42 EST 2010
https://bugzilla.novell.com/show_bug.cgi?id=656004
https://bugzilla.novell.com/show_bug.cgi?id=656004#c0
Summary: cecil/light PropertyDefinition caching issue
Classification: Mono
Product: Mono: Class Libraries
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Cecil
AssignedTo: jbevain at novell.com
ReportedBy: spouliot at novell.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Something goes wrong, somewhere and, as usual, this is hard to replicate. The
easiest way is to run gendarme's "make self-test" where the rule
AvoidPropertiesWithoutGetAccessorRule is returning several false positives due
to this bug.
I've tracked this to a caching issue in PropertyDefinition but I've not been
able to build a smaller test case.
The following patch "solves" the issue. Note that the cache can also be broken
by using set_SetMethod before calling get_GetMethod - but this is not what's
triggering the bug in gendarme.
diff --git a/mcs/class/Mono.Cecil/Mono.Cecil/PropertyDefinition.cs
b/mcs/class/Mono.Cecil/Mono.Cecil/PropertyDefinition.cs
index 835a929..d6f4e40 100644
--- a/mcs/class/Mono.Cecil/Mono.Cecil/PropertyDefinition.cs
+++ b/mcs/class/Mono.Cecil/Mono.Cecil/PropertyDefinition.cs
@@ -245,8 +245,8 @@ namespace Mono.Cecil {
void InitializeMethods ()
{
- if (get_method != null || set_method != null)
- return;
+// if (get_method != null || set_method != null)
+// return;
var module = this.Module;
if (!module.HasImage ())
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list