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
Paul Pluzhnikov b56375e76a Reduce stack use and apply CONFIG_DEBUG_FRAME to more code.
Currently, libunwind allocates several PATH_MAX entries on stack, while
trying to find a binary via /proc/.../maps.

However stack space may be at premium (especially when sigaltstack is used),
and PATH_MAX on Linux is 4096, while SIGSTKSZ is only 8192 on x86.

Attached patch eliminates multiple PATH_MAX stack allocations, and simplifies
code in maps_next, at the cost of being unable to do anything if we can't
mmap one page. It appears to me that under such low-memory conditions,
libunwind will fail shortly elsewhere anyway.

This patch also disables more of debug_frame-handling code when
CONFIG_DEBUG_FRAME is undefined.

Tested on Linux/x86_64 with and without CONFIG_DEBUG_FRAME, no regressions.
2009-10-07 12:51:03 -07:00
..
arm Allow caller to block signals. 2009-09-25 09:35:31 -07:00
dwarf Reduce stack use and apply CONFIG_DEBUG_FRAME to more code. 2009-10-07 12:51:03 -07:00
hppa Allow caller to block signals. 2009-09-25 09:35:31 -07:00
ia64 Make the remaining sigprocmask calls conditional on --enable-block-signals 2009-09-29 23:14:50 -07:00
mi Add initial ARM and MIPS support. To support this, also enable the 2008-02-04 17:16:37 -07:00
mips Allow caller to block signals. 2009-09-25 09:35:31 -07:00
ppc Mark Wielaard <mwielaard@redhat.com> writes: 2007-10-01 08:35:01 -06:00
ppc32 Allow caller to block signals. 2009-09-25 09:35:31 -07:00
ppc64 Allow caller to block signals. 2009-09-25 09:35:31 -07:00
ptrace Fix ppc32 build. 2009-04-13 11:44:45 -07:00
setjmp Add initial ARM and MIPS support. To support this, also enable the 2008-02-04 17:16:37 -07:00
unwind Use a shorter path for include 2009-04-13 10:57:21 -07:00
x86 Allow caller to block signals. 2009-09-25 09:35:31 -07:00
x86_64 Allow caller to block signals. 2009-09-25 09:35:31 -07: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 Remove the special casing of ia64 for GetIPInfo() 2009-04-24 11:10:08 -07: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 Reduce stack use and apply CONFIG_DEBUG_FRAME to more code. 2009-10-07 12:51:03 -07:00
os-linux.h Reduce stack use and apply CONFIG_DEBUG_FRAME to more code. 2009-10-07 12:51:03 -07:00