aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/tile/setcontext.S
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@ezchip.com>2015-07-21 12:04:52 -0400
committerChris Metcalf <cmetcalf@ezchip.com>2015-07-21 12:11:55 -0400
commit0ac4f1dab3e5778c79994a89111b4eb1d247ab12 (patch)
treebcc24bc8dd8a2c2b879e38a1c97234d9fcf420ba /sysdeps/unix/sysv/linux/tile/setcontext.S
parentf30d94a74a30b832354d4b87c23a4909ed24b929 (diff)
downloadglibc-0ac4f1dab3e5778c79994a89111b4eb1d247ab12.tar
glibc-0ac4f1dab3e5778c79994a89111b4eb1d247ab12.tar.gz
glibc-0ac4f1dab3e5778c79994a89111b4eb1d247ab12.tar.bz2
glibc-0ac4f1dab3e5778c79994a89111b4eb1d247ab12.zip
tile: Fix BZ #18508 (makecontext yield infinite backtrace)
It turns out tile suffered from the same problem as S390. However, disabling CFI information for the __startcontext on tile was not sufficient to fix the problem; I think the backtracer will just blindly try to follow the link register (lr) in that case. Instead, the change adds a cfi_undefined directive for "lr" and then arranges to call __startcontext directly when the new context starts, rather than just synthesizing a return to it. In addition to being a bit easier now to understand the control flow, this also allows the cfi_undefined directive to be placed in a way that causes it to be in force at the address that the "lr" from the called function points to.
Diffstat (limited to 'sysdeps/unix/sysv/linux/tile/setcontext.S')
-rw-r--r--sysdeps/unix/sysv/linux/tile/setcontext.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/tile/setcontext.S b/sysdeps/unix/sysv/linux/tile/setcontext.S
index ee9edbefe1..02d6a1578c 100644
--- a/sysdeps/unix/sysv/linux/tile/setcontext.S
+++ b/sysdeps/unix/sysv/linux/tile/setcontext.S
@@ -190,7 +190,9 @@ END (__setcontext)
weak_alias (__setcontext, setcontext)
ENTRY (__startcontext)
+ cfi_undefined (lr)
FEEDBACK_ENTER(__startcontext)
+ jalr r31
BEQZ r30, 1f
{
move r0, r30