[Top][All Lists]

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

Re: [Libunwind-devel] [Patch help]libunwind x86_64 missing actual cause

From: Dave Watson
Subject: Re: [Libunwind-devel] [Patch help]libunwind x86_64 missing actual cause frame in sigsegv handler
Date: Mon, 4 Mar 2019 18:11:48 +0000
User-agent: NeoMutt/20180716

Hi Brock, 

On 03/01/19 07:58 AM, Brock York wrote:
> I wrote a test program (attached) to learn how to use libunwind to
> perform a backtrace from a sigsegv handler.
> To test the segfault handler the segfault was caused by calling a bad
> function pointer.
> Because of this RBP hasn't been updated as there was no function
> preamble to go to.
> This seems to screw up the back trace which ends up missing the
> function that called the bad function pointer as shown below in the
> example output.
> The attached patch does solve the problem for my test program but I'm
> not sure on what weird edge cases I could be creating.
> When running `make check` the test-ptrace test now fails on my
> machine. So I'm looking for advice about whether this could be
> feasible as a fix or not as I know it seems quite crazy.

I think the attached patch is probably ok.  This codepath only happens
after dwarf parsing fails, so any heuristic-rpb thing is ok here (it
will only happen for backtrace()).  

Can you send a pull request to github?  I have minor code review
comments and it's easier to do there (and it runs the test suite).


reply via email to

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