libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libunwind] SIGSEGV in libunwind


From: Arun Sharma
Subject: [libunwind] SIGSEGV in libunwind
Date: Fri, 18 Nov 2005 15:43:55 -0800
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051011)


This is with 0.98.5 on x86-64. The compiler is gcc-4.0.1.

Program received signal SIGSEGV, Segmentation fault.
access_mem (as=0x2b9d120, addr=8397327460224067620, val=0x7fffff958f18,
    write=0, arg=0x7fffff9593b8) at x86_64/Ginit.c:117
117           *val = *(unw_word_t *) addr;
(gdb) bt
#0  access_mem (as=0x2b9d120, addr=8397327460224067620, val=0x7fffff958f18,
    write=0, arg=0x7fffff9593b8) at x86_64/Ginit.c:117
#1 0x0000000001e84834 in _Ux86_64_is_signal_frame (cursor=Variable "cursor" is not available.
)
    at x86_64/Gis_signal_frame.c:53
#2 0x0000000001e84197 in _Ux86_64_step (cursor=Variable "cursor" is not available.
) at x86_64/Gstep.c:59

...

#18 0x0000000001e8daf2 in __do_global_ctors_aux ()
#19 0x00000000009a7db0 in _init ()
#20 0x00000030cf4e5301 in ?? ()
#21 0x0000000001e8da40 in __libc_csu_init ()
#22 0x000000338041c362 in __libc_start_main () from /lib64/libc.so.6
#23 0x00000000009a98a9 in _start ()

I was able to determine that frame #20 is the one causing problems.

Looking at the code:

/* DWARF failed, let's see if we can follow the frame-chain
         or skip over the signal trampoline.  */

it sounds like when dwarf failed to unwind, it also corrupted c->dwarf.ip and dereferencing that bad ip to check if it's a signal frame is causing an issue.

Perhaps we can save the old c->dwarf.ip (0x00000000009a7db0 in this case) and use that to check for a signal frame? Any other suggestions?

        -Arun

reply via email to

[Prev in Thread] Current Thread [Next in Thread]