1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-06-28 12:11:45 +02:00
libunwind-eh_elf/src
Arun Sharma 649f1fb344 [X86-64] For local unwinding, we have a defence mechanism against
bad/missing unwind information, which could result in libunwind
dereferencing bad pointers. This mechanism is based on msync(2) system
call and significantly reduces the chances of a bad pointer
dereference in libunwind.

The original idea was to turn this mechanism on only when necessary
i.e. libunwind didn't find proper unwind information for a IP.

There are a couple of problems in the current implementation.

* The flag is global and is modified without locking
* The flag isn't reset when starting a new unwind

The attached patch makes ->validate a per-thread setting by moving it
into struct cursor from unw_local_addr_space and resets it to false
when starting a new unwind. As a result, cursor->as_arg points to the
cursor itself instead of the ucontext (for the local case).

This was found to reduce the number of msync() system calls from an
application using libunwind significantly.

Signed-off-by: Paul Pluzhnikov <ppluzhnikov@google.com>
Signed-off-by: Arun Sharma <arun.sharma@google.com>
2008-06-16 14:35:53 -06:00
..
arm [ARM] This patch add some missing bits on ARM platform. 2008-04-21 13:43:18 -06:00
dwarf Add initial ARM and MIPS support. To support this, also enable the 2008-02-04 17:16:37 -07:00
hppa Mark Wielaard <mwielaard@redhat.com> writes: 2007-10-01 08:35:01 -06:00
ia64 Merge ../libunwind-v0.98 2007-11-14 16:51:14 -07:00
mi Add initial ARM and MIPS support. To support this, also enable the 2008-02-04 17:16:37 -07:00
mips Add initial ARM and MIPS support. To support this, also enable the 2008-02-04 17:16:37 -07:00
ppc Mark Wielaard <mwielaard@redhat.com> writes: 2007-10-01 08:35:01 -06:00
ppc32 [PPC32] Make PPC32 unwinding work for real. 2007-10-08 12:33:18 -06:00
ppc64 Mark Wielaard <mwielaard@redhat.com> writes: 2007-10-01 08:35:01 -06:00
ptrace [ARM] This patch add some missing bits on ARM platform. 2008-04-21 13:43:18 -06:00
setjmp Add initial ARM and MIPS support. To support this, also enable the 2008-02-04 17:16:37 -07:00
unwind Add initial ARM and MIPS support. To support this, also enable the 2008-02-04 17:16:37 -07:00
x86 [X86] Cleanup XMM handling for x86 2008-01-07 15:41:20 -07:00
x86_64 [X86-64] For local unwinding, we have a defence mechanism against 2008-06-16 14:35:53 -06:00
elf32.c Do nothing of UNW_REMOTE_ONLY is defined. 2003-02-15 03:10:30 +00:00
elf32.h (Logical change 1.45) 2003-02-08 10:10:59 +00:00
elf64.c Do nothing of UNW_REMOTE_ONLY is defined. 2003-02-15 03:10:30 +00:00
elf64.h (Logical change 1.45) 2003-02-08 10:10:59 +00:00
elfxx.c Introduce a tdep_get_func_addr_hook() in the ELF lookup_symbol() 2007-08-22 13:02:09 -06:00
elfxx.h Introduce a tdep_get_func_addr_hook() in the ELF lookup_symbol() 2007-08-22 13:02:09 -06:00
Makefile.am Make the linking of C++ ABI related code for exceptions optional. 2008-06-16 14:28:36 -06:00
Makefile.in Rebuild autoconf files with autoreconf. 2008-06-16 14:30:38 -06:00
os-hpux.c Include "libunwind_i.h" instead of "tdep.h" and "internal.h". 2005-05-20 09:48:08 +00:00
os-linux.c Include "libunwind_i.h" instead of "tdep.h" and "internal.h". 2005-05-20 09:48:08 +00:00
os-linux.h [Linux] Fix potentially overlapping memory-copy to use memmove() instead 2007-10-18 10:45:55 -06:00