mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-09-30 02:19:31 +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. |
||
---|---|---|
.. | ||
Gexpr.c | ||
Gfde.c | ||
Gfind_proc_info-lsb.c | ||
global.c | ||
Gparser.c | ||
Gpe.c | ||
Gstep.c | ||
Lexpr.c | ||
Lfde.c | ||
Lfind_proc_info-lsb.c | ||
Lparser.c | ||
Lpe.c | ||
Lstep.c |