[Mono-bugs] [Bug 80008][Nor] Changed - SoapFormatter consumes all memory
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri Nov 24 12:55:24 EST 2006
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 csaba.halasz at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=80008
--- shadow/80008 2006-11-24 12:21:50.000000000 -0500
+++ shadow/80008.tmp.24061 2006-11-24 12:55:24.000000000 -0500
@@ -66,6 +66,20 @@
indexed by field objects. Fields are obtained by the formatter by
calling FormatterServices.GetSerializableMembers, which in some cases
may create clones of FieldInfo objects (as a result of fixing bug
74760). Every clone will have a different identity, so
GetCachedSoapAttribute will cache every such clone, growing the
hashtable forever.
+
+------- Additional Comments From Csaba.Halasz at gmail.com 2006-11-24 12:55 -------
+That should fix it. However I still don't like the idea of a cache
+that can grow indefinitely. I know that at the worst case it will
+contain all fields of all types loaded and I can believe that that
+should be a non-issue regarding memory consumption, but still.
+
+Also I was wondering if cloning is necessary in
+System.Runtime.Serialization.FormatterServices:GetFields even if the
+field name does not need to be changed. What do you think about the
+attached small patch? (that is in addition to yours).
+
+In the meantime (pun intended ;)) I am working on an (unlikely) test
+case to show that the cache can still grow out of bounds.
More information about the mono-bugs
mailing list