[Mono-bugs] [Bug 68377][Maj] New - Memory corruption bug?
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 14 Oct 2004 16:30:56 -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 lluis@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=68377
--- shadow/68377 2004-10-14 16:30:56.000000000 -0400
+++ shadow/68377.tmp.2727 2004-10-14 16:30:56.000000000 -0400
@@ -0,0 +1,56 @@
+Bug#: 68377
+Product: Mono: Runtime
+Version: unspecified
+OS: SUSE 9.1
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: lluis@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Memory corruption bug?
+
+Steps to reproduce the problem:
+
+cd to mcs/class/System.Runtime.Remoting and run: make run-tests
+The tests stop with the following error message:
+
+File 'System.Runtime.Remoting_test_default, Version=0.0.0.0,
+Culture=neutral, PublicKeyToken=null' not found.
+make[1]: *** [run-test-lib] Error 2
+make[1]: Leaving directory `/home/lluis/work/mcs/class/System.Runtime.Remoting'
+make: *** [run-test] Error 2
+
+Now, open
+mcs/class/corlib/System.Runtime.Remoting.Messaging/CallContext.cs, and do
+the following changes:
+1) Remove the ThreadStatic attribute from the Headers and datastore fields.
+2) Initialize the datastore field like this:
+static Hashtable datastore = new Hashtable ();
+3) Replace the Datastore property with:
+ private static Hashtable Datastore
+ {
+ get {
+ Hashtable r = datastore;
+ if (r == null) {
+ datastore = new Hashtable ();
+ return datastore;
+ }
+ return r;
+ }
+ }
+
+Run the test again, and you'll see that it still fails in the same way.
+Remove the line "datastore = new Hashtable ();" from the Datastore property
+and try again. Nunit does not crash anymore (at least for me).
+
+I have no idea how a "datastore = new Hashtable ()" assignment can cause
+that crash, so I guess there must be some corruption somewhere.
+
+This is a recent regression, 4 o 5 days at most.