libunwind-devel
[Top][All Lists]
Advanced

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

Re: [Libunwind-devel] Libunwind support for NULL IP


From: Prabhat Verma
Subject: Re: [Libunwind-devel] Libunwind support for NULL IP
Date: Tue, 3 Apr 2012 15:47:02 +0000

-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Arun Sharma
Sent: Sunday, March 25, 2012 9:53 PM
To: Prabhat Verma
Cc: address@hidden
Subject: Re: [Libunwind-devel] Libunwind support for NULL IP

On Fri, Mar 16, 2012 at 8:55 AM, Prabhat Verma <address@hidden> wrote:
> We are trying to replace backtrace with libunwind (local unwinding) 
> for our diagnostic purposes. A major motivation behind this decision 
> was the inability of backtrace to handle stack frames containing NULL 
> IP. In our case, this may happen if someone ends up doing this:

>>I pushed a few changes to the git repo. Could you please try them to see if 
>>things work better for you?

>>In short: dwarf says NULL RBP is the end of the callchain. But libunwind was 
>>terminating unwind on NULL RIP as well.

>>In the process I seem to have introduced a test failure (run-ptrace-misc used 
>>to pass earlier). I'll dig into it when I get a chance. On the face of it, it 
>>looks like unwinding from (ip == 0) used to succeed earlier, but it fails now 
>>(due to lack of unwind info?).

 >>-Arun


I tried this fix but it seems to be broken in more ways than expected... 
I am sending you the test program for reference. For now, I set the IP to a 
non-null value and it seems to unwind all the way except that first two frames 
are lost i.e. if main() calls foo1() calls foo() calls 
do_null_fp_dereferece_and_segv(), then the generated stacktrace will show 
frames foo1 - main (do_null_fp.. and foo are lost).... 
That said, for us, this is still a big improvement over backtrace and the 
initial tests look exciting.

-Prabhat

Attachment: myFirstExp.cpp
Description: myFirstExp.cpp


reply via email to

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