hanchenye-llvm-project/libunwind
Asiri Rathnayake 45e59f7198 [libunwind] Improve unwinder stack usage - II
unwind_phase1 and unwind_phase2 allocate their own copies of unw_cursor_t buffers
on the stack. This can blow-up stack usage of the unwinder depending on how these
two functions get inlined into _Unwind_RaiseException. Clang seems to inline
unwind_phase1 into _Unwind_RaiseException but not unwind_phase2, thus creating
two unw_cursor_t buffers on the stack.

One way to work-around this problem is to mark both unwind_phase1 and
unwind_phase2 as noinline. This patch takes the less compiler-dependent approach
and explicitly allocate a unw_cursor_t buffer and pass that into unwind_phase1
and unwind_phase2 functions.

A follow-up patch will replicate this behavior for the non-EHABI and non-SJLJ
implementations.

Reviewers: jroelofs, bcraig.

Differential revision: http://reviews.llvm.org/D20320

llvm-svn: 271004
2016-05-27 15:41:45 +00:00
..
cmake Replace cmake check for printf with a check for fopen. 2015-12-10 00:47:08 +00:00
include Introduce a native-only unwinder build. 2016-05-25 12:36:34 +00:00
src [libunwind] Improve unwinder stack usage - II 2016-05-27 15:41:45 +00:00
test Fix unw_getcontext() return value on AArch64. 2015-06-25 15:12:46 +00:00
.arcconfig
.clang-format
CMakeLists.txt [libunwind] Disable cross-unwinding by default. 2016-05-27 08:29:27 +00:00