Bug: Incorrect signal behavior in multi-threaded processes

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Jan 30 15:48:00 GMT 2019


On Jan 30 11:44, Corinna Vinschen wrote:
> On Jan 29 18:21, Dan Bonachea wrote:
> > > A minimal test program is copied below and also available here:
> > > https://upc-bugs.lbl.gov/bugzilla/attachment.cgi?id=589
> > 
> > > It's worth noting POSIX 1003.1-2016 sec XRAT.B.2.4.1 (p.3577)
> > > specifically requires that any given signal should be delivered to
> > > exactly one thread. Also the spec for abort (p.565) requires the
> > > signal to be delivered as if by `raise(SIGABRT)` (p.1765) aka.
> > > `pthread_kill(pthread_self(),SIGABRT)` (p.1657), which implies
> > > any registered SIGABRT handler should run only on the thread
> > > which called abort().
> > 
> > Poking around further, I find that replacing the signal generation
> > code in the test program for all cases with :
> > 
> >   pthread_kill(pthread_self(),sigid)
> > 
> > generates compliant signal delivery behavior!
> 
> Thanks, I fixed that in Cygwin.  It will be part of the 3.0 release.

I think I have a solution for the SISEGV misbehaviour.  I have to
test it a bit but this may make it into Cygwin 3.0 if all is well.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20190130/daff59d3/attachment.sig>


More information about the Cygwin mailing list