diff options
author | Bryan Hundven <bryanhundven@gmail.com> | 2016-01-03 03:16:20 (GMT) |
---|---|---|
committer | Bryan Hundven <bryanhundven@gmail.com> | 2016-01-03 03:16:20 (GMT) |
commit | 4be30098af5e6160d9c1e85b915c5a12a5e91350 (patch) | |
tree | b685925e1f40595097381e89b83bace04933ffd0 /patches/gcc/5.3.0/873-xtensa-fix-_Unwind_GetCFA.patch | |
parent | 8115774ea7fa85637e079fe75f455b790a5e2070 (diff) | |
parent | 8f4019e6937d6064600e2360b500b49187083a9f (diff) |
Merge pull request #306 from bhundven/update_gcc
gcc: Update gcc 5 to 5.3.0
Diffstat (limited to 'patches/gcc/5.3.0/873-xtensa-fix-_Unwind_GetCFA.patch')
-rw-r--r-- | patches/gcc/5.3.0/873-xtensa-fix-_Unwind_GetCFA.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/patches/gcc/5.3.0/873-xtensa-fix-_Unwind_GetCFA.patch b/patches/gcc/5.3.0/873-xtensa-fix-_Unwind_GetCFA.patch new file mode 100644 index 0000000..2d8eb7c --- /dev/null +++ b/patches/gcc/5.3.0/873-xtensa-fix-_Unwind_GetCFA.patch @@ -0,0 +1,40 @@ +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(-) + +diff --git a/libgcc/config/xtensa/unwind-dw2-xtensa.c b/libgcc/config/xtensa/unwind-dw2-xtensa.c +index 82b0e63..8e579c7 100644 +--- a/libgcc/config/xtensa/unwind-dw2-xtensa.c ++++ b/libgcc/config/xtensa/unwind-dw2-xtensa.c +@@ -130,7 +130,7 @@ _Unwind_GetGR (struct _Unwind_Context *context, int index) + _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. */ +-- +1.8.1.4 + |