From: "Kevin D. Kissell" <kevink@paralogos.com>
To: Shane McDonald <mcdonald.shane@gmail.com>
Cc: linux-mips@linux-mips.org
Subject: Re: Unexpected behaviour when catching SIGFPE on FPU-less system
Date: Mon, 03 May 2010 19:04:02 -0700 [thread overview]
Message-ID: <4BDF8092.1060401@paralogos.com> (raw)
In-Reply-To: <k2hb2b2f2321005031843l87f39f36h960153cae3ec5020@mail.gmail.com>
Shane McDonald wrote:
> Hi Kevin:
>
> On Mon, May 3, 2010 at 2:47 PM, Kevin D. Kissell <kevink@paralogos.com> wrote:
>
>> Sorry about my previous message having escaped with no value added.
>>
>> I think you need to look at just what it is that your feclearexcept() does.
>> From the strace information, it looks as if it may be that the FPU emulator
>> is erroneously throwing an exception in response to some manipulation of the
>> emulated FPU registers by feclearexcept(), so that it's taking a second FP
>> exception within the signal handler. That's the simplest explanation for
>> the macroscopic behavior, anyway.
>>
>> Regards,
>>
>> Kevin K.
>>
>
> Commenting out the feclearexcept() line gives the same result:
>
> old_mmap(NULL, 65536, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ace9000
> write(1, "About to try calculation\n"..., 25About to try calculation
> ) = 25
> --- SIGFPE (Floating point exception) @ 0 (0) ---
> --- SIGFPE (Floating point exception) @ 0 (0) ---
> +++ killed by SIGFPE +++
>
> So, it must not be the feclearexcept() causing the problem.
>
Well, that nested floating point exception must be coming from
*somewhere*. If it's not library code being betrayed by the emulator,
perhaps some kernel-mode code is being invoked which is carelessly
assuming the existence of a hardware FPU and throwing us back into the
exception handler. If it was me, at this point, I'd turn on some kind of
logging of FP exception PCs to see where that second one is coming from.
There was a time when I had the necessary equipment on my desk to hunt
this down and kill it, out of a lingering sense of responsibility for
having bolted that FPE into the kernel way back when. I no longer have
that setup, so I'm free to speculate. ;o)
Regards,
Kevin K.
next prev parent reply other threads:[~2010-05-04 2:04 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-03 2:17 Unexpected behaviour when catching SIGFPE on FPU-less system Shane McDonald
2010-05-03 20:39 ` Kevin D. Kissell
2010-05-03 20:47 ` Kevin D. Kissell
[not found] ` <k2hb2b2f2321005031843l87f39f36h960153cae3ec5020@mail.gmail.com>
2010-05-04 2:04 ` Kevin D. Kissell [this message]
[not found] ` <n2pb2b2f2321005032049h56cd72ceh3ac7120c547b59c5@mail.gmail.com>
2010-05-04 4:35 ` Shane McDonald
2010-05-04 6:56 ` Shane McDonald
2010-05-04 7:13 ` Shane McDonald
2010-05-04 11:16 ` Kevin D. Kissell
2010-05-04 12:56 ` Shane McDonald
2010-05-04 16:13 ` Kevin D. Kissell
2010-05-04 18:44 ` Ralf Baechle
2010-05-04 18:58 ` Kevin D. Kissell
2010-05-04 19:28 ` Geert Uytterhoeven
2010-05-04 19:30 ` Manuel Lauss
2010-05-04 19:44 ` Geert Uytterhoeven
2010-05-04 20:01 ` David Daney
2010-05-04 21:23 ` Kevin D. Kissell
2010-05-04 18:55 ` Kevin D. Kissell
2010-05-04 21:52 ` Kevin D. Kissell
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=4BDF8092.1060401@paralogos.com \
--to=kevink@paralogos.com \
--cc=linux-mips@linux-mips.org \
--cc=mcdonald.shane@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.