[Mono-bugs] [Bug 34318][Nor] New - When Calling thread.Start();thread.Abort();thread.Start(), mono segfaults

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
20 Nov 2002 03:58:45 -0000


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 kiwnix@yahoo.es.

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

--- shadow/34318	Tue Nov 19 22:58:45 2002
+++ shadow/34318.tmp.20993	Tue Nov 19 22:58:45 2002
@@ -0,0 +1,58 @@
+Bug#: 34318
+Product: Mono/Runtime
+Version: unspecified
+OS: Debian Woody
+OS Details: anon-cvs Wed Nov 20 04:53:39 CET 2002
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: kiwnix@yahoo.es               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: When Calling thread.Start();thread.Abort();thread.Start(), mono segfaults
+
+Description of Problem:
+When calling thread.Start();thread.Abort();thread.Start(); in mono, it
+segfaults after displaying the exception (if the exception is not handled)
+
+TestCase:
+using System;
+using System.Threading;
+
+public class Prueba
+{
+	public class C2Test
+	{
+		public int cnt;
+		public C2Test()
+		{
+			this.cnt = 0;
+		}
+
+		public void TestMethod()
+		{
+			while (true)
+			{
+				if (cnt < 1000)
+					cnt++;
+			       	else
+					cnt = 0;
+			}
+		}
+	}
+
+	public static void Main()
+	{
+		bool errorThrown = false;
+		C2Test test1 = new C2Test();
+		Thread TestThread = new Thread(new ThreadStart(test1.TestMethod));
+		TestThread.Start();
+		TestThread.Abort();
+		TestThread.Start();
+	}
+}