X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type :content-transfer-encoding:date:from:to:subject:in-reply-to :references:message-id; q=dns; s=default; b=Jp/42AtLm4OoQzFvG6eo e6e0BfHWYpjam372LYUCR7tuLiLEYqoLk+z6mAc01k6be1t28VUnfQNfLngFj1mi P12nbdRPDKtkg9MJIt74ZKr7Awg0l1oSGpHYwIMBrlQnl95Xhgbw2nkgJcEX2Dxb TgRnRhRG7Skfcss2dKb9iY0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type :content-transfer-encoding:date:from:to:subject:in-reply-to :references:message-id; s=default; bh=NYCY37pEAguslcmx1RX9zngVBa k=; b=djRkMOkqGq4HR1kiMjLUWeE3Lbbq2ZM6owp0BhIcvNQElP9ANXR8+n397T x4/GPN9zlOEjr/qQUdF1Eh5lBZ/FcxnczaxXrLXSYbk2NPFR4vm7EkK3zEBkajKk u/w8Ltr+VNsOfO0R5hBjbVmImcnIpAoZ1Xu9M2SZVRJgp9RX8= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,KAM_NUMSUBJECT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:1.1, Hx-spam-relays-external:ESMTPA X-HELO: lb3-smtp-cloud9.xs4all.net MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 26 Apr 2018 12:55:12 +0200 From: Houder To: cygwin AT cygwin DOT com Subject: Re: Bug: Synchronous signals broken on Cygwin 64 In-Reply-To: References: Message-ID: <0f5ba950a5722d3f4031c2f784d85b30@xs4all.nl> X-Sender: houder AT xs4all DOT nl User-Agent: XS4ALL Webmail X-CMAE-Envelope: MS4wfGNDiGmJLeQxMzfOGOVer+qAiHsV9TGo9dzhg3lukVcWAcRp9BD7Wyj7WGXyO945JykhftI4o2HFvornKsJ1II0m//M+TNvajyV68m3tYXftlxtXKAbv dXmFbFztKxH6BXcvIimrI+Hpiff/ONJkgoMV9XjtwOTgmSWLZJ2VNx0SsDd1lNyId6chxmH7mK0hnejzNuVzL4LAKx8MhMf+eVE= On 2018-04-26 12:45, Houder wrote: > On Thu, 26 Apr 2018 09:57:59, Thomas Zimmermann wrote: > >> Hello mailing list, >> >> I noticed that synchronous signals (e.g., SIGSEGV, SIGFPE) appear to >> be >> broken on 64-bit Cygwin systems. I could not find additional >> information >> on the mailing list. If this is not already a known problem, you'll >> find >> some analysis below. >> >> I use Cygwin DLL 2.10 with all packages up-to-date. My test system >> runs >> Windows 7. >> >> The expected behavior is that an installed signal handler runs exactly >> once for a signal and the OS terminates the program if the handler >> returns. This works on 32-bit Cygwin. From my observation, Cygwin 64 >> differs in the follow ways: > > .. uhm, unless SA_RESETHAND (sa_flags) has been specified, I expect the > handler to be invoked again and again ... ... and if SA_RESETHAND has been specified, the OS will terminate the program after the 1st invocation of the handler (yes, in case of this type of exception; in this case FPE) > And that is what I observe on Linux ... > >> 1) Generating a synchronous signal on the main thread, makes the >> signal >> handler enter an endless loop. The attached test 'syncsig.c' >> illustrates >> this. >> >> 2) Generating a synchronous signal on an additional POSIX thread >> ignores >> the installed signal handler entirely. The handler does not run and >> the >> program gets terminated immediately. The attached test 'syncsig_mt.c' >> illustrates this. > > Yes, this behaviour is wrong ... > > Henri -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple