From: Mark Kettenis <kettenis@chello.nl>
To: mec.gnu@mindspring.com
Cc: david@streamline-computing.com, gdb-patches@sources.redhat.com
Subject: Re: [Patch] x % 0 hangs
Date: Sat, 26 Jun 2004 22:52:00 -0000 [thread overview]
Message-ID: <200406262252.i5QMqJGP000626@elgar.kettenis.dyndns.org> (raw)
In-Reply-To: <20040626154420.265CD4B104@berman.michael-chastain.com> (mec.gnu@mindspring.com)
Date: Sat, 26 Jun 2004 11:44:20 -0400 (EDT)
From: mec.gnu@mindspring.com (Michael Elizabeth Chastain)
I like your patch, although I can't approve it.
There is a PR for this:
http://sources.redhat.com/gdb/bugs/1056
divide by zero hangs gdb
Could you a line to your ChangeLog like this:
2004-06-26 <david@streamline-computing.com>
Partial fix for PR cli/1056.
* valarith.c: check for zero in division and remainder
evaluation.
> Although there may be some systems that can healthily respond to this, I
> propose a trivial patch - unless someone is going to tell me there's an
> option to stop the hanging, or respond differently to the signal.
Someone still has to dive into the signal handling design and fix the
lower-level problem, which is analyzed in the PR. Briefly, the problem
is that gdb defers the its response to the signal and returns from the
signal handler, but returning from the signal handler for SIGFPE can
re-execute the same instruction that hung.
Fixing this is highly non-trivial. 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. Therefore I think this patch
is a very good idea.
I just wonder whether just printing "Division by zero" as the error
message would be enough.
David, consider this patch with or without that change approved.
Please modify your ChangeLog as requested by Michael though.
Mark
next prev parent reply other threads:[~2004-06-26 22:52 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 [this message]
2004-06-26 23:19 ` Andrew Cagney
2004-06-27 15:06 ` Ian Lance Taylor
2004-06-27 17:15 ` Mark Kettenis
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=200406262252.i5QMqJGP000626@elgar.kettenis.dyndns.org \
--to=kettenis@chello.nl \
--cc=david@streamline-computing.com \
--cc=gdb-patches@sources.redhat.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