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 <davejwat...@fb.com> 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! > > _______________________________________________ Libunwind-devel mailing list Libunwind-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/libunwind-devel