History log of /external/libunwind/src/x86_64/Gos-linux.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1010880548589685a27b8f63ef54a3ea78e052fc 28-Nov-2011 Arun Sharma <asharma@fb.com> Address x86_64 crashes when using sigaltstack

The crashes were tracked down to f->rpb_cfa_offset being incorrect.

The problem is that {rsp,rbp}_cfa_offset only have 15 bits, but for
SIGRETURN frame they are filled with:

// src/x86_64/Gstash_frame.c

f->cfa_reg_offset = d->cfa - c->sigcontext_addr;
f->rbp_cfa_offset = DWARF_GET_LOC(d->loc[RBP]) - d->cfa;
f->rsp_cfa_offset = DWARF_GET_LOC(d->loc[RSP]) - d->cfa;

The problem is that the delta here can be arbitrarily large when
sigaltstack is used, and can easily overflow the 15 and 30-bit fields.

When signal handler starts running, the stack layout is:

... higher addresses ...
ucontext
CFA->
__restore_rt (== pretcode in rt_sigframe from
linux-2.6/arch/x86/include/asm/sigframe.h)
SP ->
... sighandler runs on this stack.

... lower addresses ...

This makes it very convenient to find ucontext from the CFA.

Attached patch re-tested on Linux/x86_64, no new failures.

Signed-off-by: Paul Pluzhnikov <ppluzhnikov@google.com>
Reviwed-by: Lassi Tuura <lat@cern.ch>
/external/libunwind/src/x86_64/Gos-linux.c
ae5c1f2adf4da04235d87d024d4d942c01b2b447 18-Apr-2011 Lassi Tuura <lat@cern.ch> Performance optimisations for fast trace.

Insert static branch prediction predicates in useful places and avoid
unnecessary code in the hottest paths. Bypass unnecessary indirect
calls, in particular to access_mem(), when known to be safe.
/external/libunwind/src/x86_64/Gos-linux.c
9e98f15e9aee12e67cd5956d06ccb559f6a06213 19-Mar-2011 Lassi Tuura <lat@iki.fi> Fast back-trace for x86_64 for only collecting the call stack.

Adds new function to perform a pure stack walk without unwinding,
functionally similar to backtrace() but accelerated by an address
attribute cache the caller maintains across calls.
/external/libunwind/src/x86_64/Gos-linux.c
aa3bb307a30a5b78bf1ae4ac843ae53e354736f5 03-May-2010 Arun Sharma <arun@sharma-home.net> Fix merge errors
/external/libunwind/src/x86_64/Gos-linux.c
0176c4f723f1ea90eb20018091ca58eedf28a4a8 29-Apr-2010 Arun Sharma <arun@sharma-home.net> Merge commit 'fdc534ccb05d1e6c0438345d292203343a811701'
fdc534ccb05d1e6c0438345d292203343a811701 29-Apr-2010 Arun Sharma <aruns@google.com> Silence a compiler warning
/external/libunwind/src/x86_64/Gos-linux.c
d3c4bc42952a1aad0297b6f86569178814275a83 25-Apr-2010 Arun Sharma <aruns@google.com> Fix a compiler warning
/external/libunwind/src/x86_64/Gos-linux.c
92cc7fd78a5a79c4bb5f85bfb7d7fb025df9cd5a 20-Apr-2010 Lassi Tuura <lat@cern.ch> Remove obsolete code for 'old way' of handling x86-64 signal frames.
/external/libunwind/src/x86_64/Gos-linux.c
dac2d001afb1fa7040ca7d8ae57032f684d7023e 20-Apr-2010 Lassi Tuura <lat@cern.ch> Identify signal frames by augmentation attribute.
/external/libunwind/src/x86_64/Gos-linux.c
1d9c5a356d72993d8e9f5ac70811a723ea156403 14-Apr-2010 Arun Sharma <aruns@google.com> Fix compiler warnings on x86_64 Linux
/external/libunwind/src/x86_64/Gos-linux.c
caa6095aec43541bdbca1ad58d6f65b3de53a1ef 08-Apr-2010 Arun Sharma <aruns@google.com> Fix compile errors on Linux
/external/libunwind/src/x86_64/Gos-linux.c
979af4502fe19b0d98459633731d004a4a010a0e 05-Apr-2010 Konstantin Belousov <kostik@pooma.home> Move local_resume to os-specific file.
/external/libunwind/src/x86_64/Gos-linux.c
0dbeeeb08dc9a7e46281954e9225a84d4629a3db 05-Apr-2010 Konstantin Belousov <kostik@pooma.home> Move uc_addr to os-specific file
/external/libunwind/src/x86_64/Gos-linux.c
8e53e62db913470952b8eb541834b876f7a6882c 05-Apr-2010 Arun Sharma <aruns@google.com> Refactor os specific code for x86 (both 32 and 64 bit).

Move Linux specific code into ${arch}/Gos-linux.c
/external/libunwind/src/x86_64/Gos-linux.c