summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/xtensa/sigrestorer.S
AgeCommit message (Collapse)Author
2016-02-24xtensa: fix stack unwinding over __default_sa_restorerMax Filippov
For some xtensa cores generated code gets arranged so that __default_sa_restorer immediately follows preceding function. E.g.: 40a1b: c03340 sub a3, a3, a4 40a1e: f01d retw.n 00040a20 <__default_sa_restorer>: 40a20: e1a022 movi a2, 225 40a23: 005000 syscall ... Contents of the .eh_frame section: ... 000007f4 00000014 000007f8 FDE cie=00000000 pc=0004076c..00040a20 DW_CFA_advance_loc4: 3 to 0004076f DW_CFA_def_cfa_offset: 48 Due to the way xtensa libgcc uw_frame_state_for calls _Unwind_Find_FDE for non-signal frames, FDE for the previous function is found during thread cancellation signal stack unwinding in that case. Signal stack frame is not recognized and is not unwound properly, breaking cleanup routines calling for cancelled thread. Insert padding before the __default_sa_restorer so that no FDE is found for it, MD_FALLBACK_FRAME_STATE_FOR is called by uw_frame_state_for and the frame is correctly recognized as signal frame. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2008-02-20Xtensa: Provide an architecture specific sigaction and sa_restorer function ↵Chris Zankel
in libc to avoid having to place executable code on stack. Signed-off-by: Chris Zankel <chris@zankel.net>