libunwind-devel
[Top][All Lists]
Advanced

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

Re: [Libunwind-devel] [PATCH] Account for multiple CFA for args_size


From: Dave Watson
Subject: Re: [Libunwind-devel] [PATCH] Account for multiple CFA for args_size
Date: Thu, 19 Jan 2017 10:13:16 -0800
User-agent: Mutt/1.6.0 (2016-04-01)

On 01/18/17 01:56 PM, Saleem Abdulrasool wrote:
> It is possible to have multiple CFA_args_size adjustments for a single
> frame.  If the CFA_args_size adjustment is immediately following the
> return from a function which can raise an exception, it is possible to
> incorrectly adjust the stack pointer.  Consider the following:
> 
>   ...
>   .cfi_escape 0x2e, 0x00
>   call f
> .Ltmp:
>   .cfi_escape 0x2e, 0x10
>   lea address@hidden(%ebx), %eax
>   ...
> 
> Because we process the CFI program up to and *INCLUDING* IP, where the
> IP is the RA, we would process the associated DW_CFA_GNU_args_size for
> the post-call instruction.  The result would be a DW_CFA_GNU_args_size
> of 0x10 rather than 0x00, resulting in an incorrect stack adjustment.
> Handle this by processing the CFI operation but not adjusting the state
> record unless we are below the current IP.

Merged, thanks!



reply via email to

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