[Mono-bugs] [Bug 82658][Nor] New - Mono segfaults when using Console.CancelKeyPress and TcpListener.BeginAcceptTcpClient

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Sep 1 12:51:18 EDT 2007


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 irwiss at gmail.com.

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

--- shadow/82658	2007-09-01 12:51:18.000000000 -0400
+++ shadow/82658.tmp.19134	2007-09-01 12:51:18.000000000 -0400
@@ -0,0 +1,64 @@
+Bug#: 82658
+Product: Mono: Runtime
+Version: 1.2
+OS: 
+OS Details: Debian Sid(mono package version 1.2.4-6)
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: JIT
+AssignedTo: lupus at ximian.com                            
+ReportedBy: irwiss at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Mono segfaults when using Console.CancelKeyPress and TcpListener.BeginAcceptTcpClient
+
+Description of Problem:
+Mono either segfaults or produces random errors when pressing ^C in
+application console.
+
+Steps to reproduce the problem:
+1. Compile with gmcs
+2. Run
+3. Press ^C
+
+Actual Results:
+Segfault, or random errors with mono source lines
+
+Expected Results:
+Execute delegate and finish properly
+
+How often does this happen? 
+About 4/5 times
+
+Additional Information:
+Removing either the CancelKeyPress delegate or the
+BeginAcceptTcpClient call making it behave properly.
+
+Code:
+using System;
+using System.Net.Sockets;
+
+namespace segfault
+{
+    class MainClass
+    {
+        public static void Main(string[] args)
+        {
+            TcpListener listener = new TcpListener(54000);
+
+            listener.Start();
+            listener.BeginAcceptTcpClient(null, listener);
+
+            Console.CancelKeyPress += delegate { Console.WriteLine("Break
+out!"); };
+
+            while(true); 
+
+            listener.Stop();
+        }
+    }
+}


More information about the mono-bugs mailing list