public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Marco Atzeri <marco.atzeri@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Bug: Synchronous signals broken on Cygwin 64
Date: Thu, 26 Apr 2018 10:44:00 -0000	[thread overview]
Message-ID: <c5ae3eb3-090e-3a3c-64c5-0abfb0b5b477@gmail.com> (raw)
In-Reply-To: <bc993d03-a9ac-d1c9-c33a-03cfc810edbe@users.sourceforge.net>

On 4/26/2018 9:57 AM, 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:
> 
> 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.
> 
> 
> As mentioned, both cases work correctly on 32-bit installations. I
> cannot point to the exact location of the problem, but it appears that
> the Cygwin exception-handler code is not set up by 64-bit code.
> 
> In case 2) I can see the Windows function KiUserExceptionDispatcher()
> being executed for the synchronous signal on the affected thread. This
> should lead to a call to the Cygwin exception handler. It does for
> 32-bit, but not for 64-bit code.

just for confirmation, same results and discrepancies on my W7

>  From what I've seen, the exception handler is installed in the c'tor
> exception::exception(). [exception.cc:138] The only invocation I found
> was in SetThreadName(). [miscfuncs.cc:951] This set-up code is 32-bit-only.
> 
> 
> BTW, is there a bug tracker for Cygwin? I'd open a bug report there, or
> add the information to an existing one.

there is no bug tracker. Bugs are managed on this mailing list.

> 
> Best regards
> Thomas
> 

Regards
Marco

--
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

  reply	other threads:[~2018-04-26 10:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-26  7:58 Thomas Zimmermann
2018-04-26 10:44 ` Marco Atzeri [this message]
2018-04-26 10:45 ` Houder
2018-04-26 10:53   ` Thomas Zimmermann
2018-04-26 11:02     ` Houder
2018-04-26 11:09       ` Thomas Zimmermann
2018-04-26 11:13       ` Thomas Zimmermann
2018-04-26 12:58         ` Houder
2018-04-26 10:55   ` Houder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c5ae3eb3-090e-3a3c-64c5-0abfb0b5b477@gmail.com \
    --to=marco.atzeri@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).