Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@chello.nl>
To: ian@wasabisystems.com
Cc: cagney@gnu.org, mec.gnu@mindspring.com,
	david@streamline-computing.com, gdb-patches@sources.redhat.com
Subject: Re: [Patch] x % 0 hangs
Date: Sun, 27 Jun 2004 17:15:00 -0000	[thread overview]
Message-ID: <200406271715.i5RHFARS007952@elgar.kettenis.dyndns.org> (raw)
In-Reply-To: <m3pt7ljb10.fsf@gossamer.airs.com> (message from Ian Lance Taylor on 27 Jun 2004 11:06:19 -0400)

   From: Ian Lance Taylor <ian@wasabisystems.com>
   Date: 27 Jun 2004 11:06:19 -0400

   Andrew Cagney <cagney@gnu.org> writes:

   > > The only approach that's somewhat
   > > portable is longjmp-ing out of the signal handler, and even that seems
   > > to have its problems on some platforms.
   > 
   > I'm curious, which platforms?

Over the years I've seen quite a few bug-reports about this failing to
work, but I can't remember exectly which platforms were affected.  It
may be related to what I say in the next paragraph though.

Anyway, if/when we start longjmp-ing out of signal handlers we have to
realize the we must restore the proper signal mask (not all
sigjmp/longjmp implementations do that) and perhaps re-install the
SIGFPE signal handler.

   I would think that it would be safe enough to longjmp on SIGFPE into
   the gdb catch_errors stack.  You would obviously be in trouble if the
   SIGFPE came from any libc stdio routine, but I would expect that to be
   impossible with a working library.

The worst case is that we'll crash, which still is an improvement over
just hanging like we do now on some platforms :-).

Mark


  reply	other threads:[~2004-06-27 17:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-26 15:44 Michael Elizabeth Chastain
2004-06-26 22:52 ` Mark Kettenis
2004-06-26 23:19   ` Andrew Cagney
2004-06-27 15:06     ` Ian Lance Taylor
2004-06-27 17:15       ` Mark Kettenis [this message]
2004-06-28 14:25         ` Andrew Cagney
2004-06-29 23:35           ` Mark Kettenis
2004-07-17  2:43             ` Andrew Cagney
  -- strict thread matches above, loose matches on Subject: below --
2004-06-26  9:23 David Lecomber

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=200406271715.i5RHFARS007952@elgar.kettenis.dyndns.org \
    --to=kettenis@chello.nl \
    --cc=cagney@gnu.org \
    --cc=david@streamline-computing.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=ian@wasabisystems.com \
    --cc=mec.gnu@mindspring.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