xtensa: fix _Unwind_GetCFA
commit15b21d23e9347af296f332787e7cf5fe96b21564
authorjcmvbkbc <jcmvbkbc@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 18 Aug 2015 01:08:22 +0000 (18 01:08 +0000)
committerjcmvbkbc <jcmvbkbc@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 18 Aug 2015 01:08:22 +0000 (18 01:08 +0000)
tree4a507f74f55497932cd063ebcfa96266dabf02e9
parent8a596a7740df9dac60b15bb009314a3fd2b775d1
xtensa: fix _Unwind_GetCFA

Returning context->cfa in _Unwind_GetCFA makes CFA point one stack frame
higher than what was actually used by code at context->ra. This results
in invalid CFA value in signal frames and premature unwinding completion
in forced unwinding used by uClibc NPTL thread cancellation.
Returning context->sp from _Unwind_GetCFA makes all CFA values valid and
matching code that used them.

2015-08-18  Max Filippov  <jcmvbkbc@gmail.com>
libgcc/
* config/xtensa/unwind-dw2-xtensa.c (_Unwind_GetCFA): Return
context->sp instead of context->cfa.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226964 138bc75d-0d04-0410-961f-82ee72b054a4
libgcc/ChangeLog
libgcc/config/xtensa/unwind-dw2-xtensa.c