delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/04/26/06:55:27

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: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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
Date: Thu, 26 Apr 2018 12:55:12 +0200
From: Houder <houder AT xs4all DOT nl>
To: cygwin AT cygwin DOT com
Subject: Re: Bug: Synchronous signals broken on Cygwin 64
In-Reply-To: <d76cfa4797d30702799a93892d454d95@smtp-cloud9.xs4all.net>
References: <bc993d03-a9ac-d1c9-c33a-03cfc810edbe AT users DOT sourceforge DOT net> <d76cfa4797d30702799a93892d454d95 AT smtp-cloud9 DOT xs4all DOT net>
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019