libunwind-devel
[Top][All Lists]
Advanced

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

Re: [Libunwind-devel] crashes trying to get a backtrace from a signal ha


From: Lassi Tuura
Subject: Re: [Libunwind-devel] crashes trying to get a backtrace from a signal handler (ARM)
Date: Fri, 10 Sep 2010 15:36:10 +0200

Hi Sven,

>> Can you double check with readelf there is unwind info for
>> __default_sa_restorer, and the exact bounds for it? At least in the
>> output you quoted there is no no FDE for delta 0xbfe8 into libc.
>> Nearest I found was bee8-0xbeec which is __aeabi_MB_CUR_MAX, and after
>> that there should be __longjmp, __vfork, clone, __sigsetjmp, setjmp
>> and _setjmp, in address order, before the __default_sa_restorer.
> 
> Here's the .debug_frame section for libc.so extracted by readelf:
> 
> http://svenfoo.org/misc/libc.so.dwarf

So yeah no unwind info in the gap 0xbeec ... 0xc080:

00000348 0000000c 00000338 FDE cie=00000338 pc=0000bee8..0000beec
00000368 00000014 00000358 FDE cie=00000358 pc=0000c080..0000c0b0

>> As far as I could tell from quick internet search
>> __default_sa_restorer is an assembler stub, so it needs unwind info to
>> be entered manually.
> 
> So it could be that uCLibc simply doesn't have this manual unwind info
> then? I will search a little, perhaps there's a patch that fixes this.

Yes. In your other mail:

> In case this might help, I have uploaded the assembler code from
> uClibc-0.9.30.1 that I believe to be relevant here:
> 
> http://svenfoo.org/misc/sigrestorer.S

No unwind info at least there. You should see some .eh_frame (or .debug_frame?) 
type description a bit like this:

http://repo.or.cz/w/glibc.git/blob?f=sysdeps/unix/sysv/linux/x86_64/sigaction.c#l122

I guess you could either coax uclibc to add the info, or teach libunwind how to 
walk around it. There's code for example like this to try to recognise linux 
signal return instruction pattern:

http://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=blob;f=src/x86/Gos-linux.c;h=31f83bae01668332dc738cc70fbc8076990a8528;hb=HEAD#l29

Regards,
Lassi


reply via email to

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