[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] SIGFPE and _Unwind_GetIPInfo problem on x86_64 (g++-4.
From: |
address@hidden |
Subject: |
[Libunwind-devel] SIGFPE and _Unwind_GetIPInfo problem on x86_64 (g++-4.5) |
Date: |
Sun, 06 Feb 2011 02:26:37 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20110105 Lightning/1.0b3pre Thunderbird/3.1.7 |
Hi,
I've experimented somewhat with throwing exceptions from within a signal
handler.
Libunwind seems to work in the case of SIGILL, SIGBUS, SIGSEGV, but not always
for SIGFPE.
The attached program shall demonstrate a failing SIGFPE-case
(sigfpe.sh contains all necessary steps to demonstrate this).
The program runs successfully if you use the default gcc unwinding routines,
but it crashes, if you preload libunwind. The only difference between
gcc and libunwind seems to be the returned flag `ip_before_ins`
when calling _Unwind_GetIPInfo. This is also shown in the test program.
As far as I can tell the following happens (See attached backtrace and output):
- personality routine is called for sighandler()-frame (#0)
- libunwind identifies a signal stack frame (with no personality routine) (#1)
- personality routine is called for fpe()-frame (#2)
Here _Unwind_GetIPInfo returns 0 for ip_before_ins because this frame
is identified as a regular frame.
As I'm not an expert on that unwinding stuff, maybe somebody else on this list
can explain, why this happens - Is it a feature of gcc or a bug in libunwind? :)
Regards
Stefan
bt_and_example_output.txt
Description: Text document
sigfpe.cpp
Description: Text Data
sigfpe.sh
Description: Bourne shell script
- [Libunwind-devel] SIGFPE and _Unwind_GetIPInfo problem on x86_64 (g++-4.5),
address@hidden <=
Re: [Libunwind-devel] SIGFPE and _Unwind_GetIPInfo problem on x86_64 (g++-4.5), Arun Sharma, 2011/02/07