[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libunwind-devel] use_prev_instr breaking unwind - how to stop it?
From: |
Doug Moore |
Subject: |
Re: [Libunwind-devel] use_prev_instr breaking unwind - how to stop it? |
Date: |
Thu, 30 Mar 2017 17:18:16 -0500 |
A colleague looked at the crash and explained it this way:
> I looked at what happens when you use
>
>> unw_set_reg(cursor, UNW_REG_IP, pc+1);
>
> This not only sets pc + 1 in the cursor, it also sets it to +1 in the unwind
> context, which is why things go to hell. Thus, I believe that the right fix
> is to patch unw_init_local for x86_64 so that it doesn’t subtract one by
> calling common_init(…, 1).
Doug
> On Mar 30, 2017, at 4:04 PM, Dave Watson <address@hidden> wrote:
>
> On 03/30/17 12:00 PM, Doug Moore wrote:
>> Documentation has to change anyway, since the unw_init_local docs are
>> currently broken.
>>
>> Decrementing the ip for my case (using unw_set_reg) gets me through a few
>> unw_step calls successfully, then crashes the program.
>
> Do you know why this crashes? I would have thought incrementing the
> IP was the same as setting use_prev_instr=0.
>
>> So, instead, I’ve attached a patch to add unw_local_init_signal to
>> the API, to solve my problem. Please consider it.
>
> Thanks Doug
>
> !DSPAM:10223,58dd730939341735888377!
>
>
- Re: [Libunwind-devel] use_prev_instr breaking unwind - how to stop it?, (continued)
- Re: [Libunwind-devel] use_prev_instr breaking unwind - how to stop it?, Dave Watson, 2017/03/27
- Re: [Libunwind-devel] use_prev_instr breaking unwind - how to stop it?, Doug Moore, 2017/03/27
- Re: [Libunwind-devel] use_prev_instr breaking unwind - how to stop it?, Dave Watson, 2017/03/29
- Re: [Libunwind-devel] use_prev_instr breaking unwind - how to stop it?, Doug Moore, 2017/03/29
- Re: [Libunwind-devel] use_prev_instr breaking unwind - how to stop it?, Doug Moore, 2017/03/29
- Re: [Libunwind-devel] use_prev_instr breaking unwind - how to stop it?, Doug Moore, 2017/03/29
- Re: [Libunwind-devel] use_prev_instr breaking unwind - how to stop it?, Dave Watson, 2017/03/30
- Re: [Libunwind-devel] use_prev_instr breaking unwind - how to stop it?, Doug Moore, 2017/03/30
- Re: [Libunwind-devel] use_prev_instr breaking unwind - how to stop it?, Doug Moore, 2017/03/30
- Re: [Libunwind-devel] use_prev_instr breaking unwind - how to stop it?, Dave Watson, 2017/03/30
- Re: [Libunwind-devel] use_prev_instr breaking unwind - how to stop it?,
Doug Moore <=