mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-06-28 12:11:45 +02:00
b56375e76a
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. |
||
---|---|---|
.. | ||
arm | ||
dwarf | ||
hppa | ||
ia64 | ||
mi | ||
mips | ||
ppc | ||
ppc32 | ||
ppc64 | ||
ptrace | ||
setjmp | ||
unwind | ||
x86 | ||
x86_64 | ||
elf32.c | ||
elf32.h | ||
elf64.c | ||
elf64.h | ||
elfxx.c | ||
elfxx.h | ||
Makefile.am | ||
os-hpux.c | ||
os-linux.c | ||
os-linux.h |