[Top][All Lists]

[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 22:41:44 +0100


>> 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.
> But the problem is that we only have 30 bits there, and I know of no reason
> to believe that alternate stack can't be further away from regular stack
> than that.
> In my actual crash the cfa_reg_offset in fact did not overflow, only the
> {rsp,rbp}_cfa_offset did, so maybe there is a reason why cfa_reg_offset
> can't overflow 30 bits?

Yes, you are right, I noticed the same. But we probably shouldn't store
the difference to the original stack but to the ucontext_t which should
be in nearby offset, on the signal stack. The reason is the delta needs
to be cacheable by %rip (there is only one, the sigreturn one), and the
offset to the original stack location (CFA delta) is not stable.

How to locate the ucontext_t I am not sure and won't be able to check
on it now, sorry. Maybe something relative to DWARF_GET_LOC(d->loc[*])?


reply via email to

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