diff options
author | Alexey Neyman <stilor@att.net> | 2017-12-02 23:30:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-02 23:30:38 (GMT) |
commit | d917a29865876b913fe2939ee2a0728145e8543a (patch) | |
tree | 4e048ed57988306696efa3c5b81a80d48030e913 /packages/gcc-linaro/5.4-2017.05/0017-xtensa-fix-_Unwind_GetCFA.patch | |
parent | e832b9b220f90b11b893e2815ceb37ec2b708683 (diff) | |
parent | 98bc4decdeab1361bdc585c86591718fb08c8ffb (diff) |
Merge pull request #874 from stilor/renumber-update-patches
Renumber & update patches
Diffstat (limited to 'packages/gcc-linaro/5.4-2017.05/0017-xtensa-fix-_Unwind_GetCFA.patch')
-rw-r--r-- | packages/gcc-linaro/5.4-2017.05/0017-xtensa-fix-_Unwind_GetCFA.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/packages/gcc-linaro/5.4-2017.05/0017-xtensa-fix-_Unwind_GetCFA.patch b/packages/gcc-linaro/5.4-2017.05/0017-xtensa-fix-_Unwind_GetCFA.patch new file mode 100644 index 0000000..2222fdb --- /dev/null +++ b/packages/gcc-linaro/5.4-2017.05/0017-xtensa-fix-_Unwind_GetCFA.patch @@ -0,0 +1,35 @@ +From b33905dc310f475ddbde4c9fb7230724b2068a2b Mon Sep 17 00:00:00 2001 +From: Max Filippov <jcmvbkbc@gmail.com> +Date: Sat, 15 Aug 2015 05:12:11 +0300 +Subject: [PATCH 3/3] 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. + +Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> +--- +Backported from: r226964 + + libgcc/config/xtensa/unwind-dw2-xtensa.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/libgcc/config/xtensa/unwind-dw2-xtensa.c ++++ b/libgcc/config/xtensa/unwind-dw2-xtensa.c +@@ -130,7 +130,7 @@ + _Unwind_Word + _Unwind_GetCFA (struct _Unwind_Context *context) + { +- return (_Unwind_Ptr) context->cfa; ++ return (_Unwind_Ptr) context->sp; + } + + /* Overwrite the saved value for register INDEX in CONTEXT with VAL. */ |