libunwind-devel
[Top][All Lists]
Advanced

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

Re: [Libunwind-devel] [RFC][patch] Fix crash in _ULx86_64_tdep_trace whe


From: Lassi Tuura
Subject: Re: [Libunwind-devel] [RFC][patch] Fix crash in _ULx86_64_tdep_trace when sigaltstack is too far away
Date: Fri, 11 Nov 2011 21:10:59 +0100

Hi,

> Ah, I see. But we could record delta here as well; just use 62 bits for it.

Actually if I understand correctly how the altstack works, you won't need
even the 62-bit offset. I think the sigcontext sits on the altstack, right,
and it's the restored RBP/RSP value deltas that are the real problem?

If so I think you can just record into cfa_reg_offset the delta to the
sigcontext_addr as the code does now, but leave {rsp,rbp}_cfa_offset 0.
Then we change the registers to be restored using UC_MCONTEXT_REGS_*,
as you did, not using the delta expressions.

Effectively, we'll use the DWARF info for CFA expression, but assume that
registers actually do come from the ucontext_t. For extra security we can
verify the DWARF locations match what we expect tdep_stash_frame(), maybe
under UNW_DEBUG.

How does that sound to you?

Regards,
Lassi



reply via email to

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