[Mono-bugs] [Bug 71274][Nor] Changed - finalizer-... tests randomly crash on x86 (Environment.Exit race)

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 17 Apr 2005 14:57:03 -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 miguel@ximian.com.

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

--- shadow/71274	2005-04-16 12:33:20.000000000 -0400
+++ shadow/71274.tmp.4161	2005-04-17 14:57:03.000000000 -0400
@@ -52,6 +52,28 @@
 The attached patch implements the proper suspending of threads at
 shutdown, but still fails sometimes due to the above mentioned problem.
 
 
 ------- Additional Comments From miguel@ximian.com  2005-04-16 12:33 -------
 Paolo, can you please review this change?
+
+------- Additional Comments From miguel@ximian.com  2005-04-17 14:57 -------
+Sample test case to reproduce (from another bug report):
+
+using System;
+using System.Threading;
+
+public class test {
+ public static void StartNewThread() {
+  Thread t = new Thread( new ThreadStart( StartNewThread ) );
+  t.Start();
+  DateTime dt = DateTime.Now;
+ }
+
+ public static void Main( string[] args ) {
+  Thread t = new Thread( new ThreadStart( StartNewThread ) );
+  t.Start();
+  Thread.Sleep( 1000 );
+  Environment.Exit( 0 );
+ }
+}
+