From: Edgar Toernig <froese@gmx.de>
To: Ulrich Drepper <drepper@redhat.com>
Cc: "Kevin B. Hendricks" <kevin.hendricks@sympatico.ca>,
linux-kernel@vger.kernel.org
Subject: Re: Catching SIGSEGV with signal() in 2.6
Date: Tue, 6 Apr 2004 17:53:01 +0200 [thread overview]
Message-ID: <20040406175301.1d46c0cd.froese@gmx.de> (raw)
In-Reply-To: <40722D42.90406@redhat.com>
Ulrich Drepper wrote:
>
> Kevin B. Hendricks wrote:
>
> > So the code has been wrong since the beginning and we were just "lucky" it
> > worked in all pre-2.6 kernels?
>
> The old code depended on undefined behavior.
Maybe it's simply *old* code, possibly written under libc5.
There, signal() used SA_RESETHAND which implies SA_NODEFER
which in turn did not block the signal and exiting from the
signal handler via longjmp was OK.
With the new signal() behaviour in glibc2 one may get results
undefined by POSIX but it still worked as before because the
sigprocmask was ignored for SIGSEGV under Linux <2.6.
It's the combination of new glibc2 and new kernel that makes
code like the mentioned one break.
It has nothing to do with POSIX - for POSIX all of this is
"undefined/implementation defined behaviour". I had chosen
to stay compatible...
Ciao, ET.
--
Not every program claims to be POSIX compliant (who reads
3600 pages of difficult to obtain specs?) - some are simply
Linux programs...
next prev parent reply other threads:[~2004-04-06 15:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-06 0:40 Kevin B. Hendricks
2004-04-06 2:04 ` Ulrich Drepper
2004-04-06 3:01 ` Kevin B. Hendricks
2004-04-06 4:08 ` Ulrich Drepper
2004-04-06 12:02 ` Kevin B. Hendricks
2004-04-06 15:53 ` Edgar Toernig [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-04-05 15:25 bero
2004-04-05 18:17 ` Jamie Lokier
2004-04-05 19:16 ` Chris Friesen
2004-04-05 20:40 ` Jamie Lokier
2004-04-05 20:59 ` Richard B. Johnson
2004-04-05 21:11 ` Chris Friesen
2004-04-05 21:12 ` Jamie Lokier
2004-04-05 21:23 ` bero
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=20040406175301.1d46c0cd.froese@gmx.de \
--to=froese@gmx.de \
--cc=drepper@redhat.com \
--cc=kevin.hendricks@sympatico.ca \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®