about summary refs log tree commit diff
path: root/sysdeps/mach
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2023-05-15 11:33:23 +0300
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-05-16 16:09:02 +0200
commit114f1b7881e63e2b4e5d0e9a9e4fb142b9cd886c (patch)
treeccca6a893d739a4fc37fbac155fefcdcfe9560de /sysdeps/mach
parente333759f7752593a69a8f9920a247ed3878fafef (diff)
downloadglibc-114f1b7881e63e2b4e5d0e9a9e4fb142b9cd886c.tar.gz
glibc-114f1b7881e63e2b4e5d0e9a9e4fb142b9cd886c.tar.xz
glibc-114f1b7881e63e2b4e5d0e9a9e4fb142b9cd886c.zip
hurd: Fix computing user stack pointer
Fixes b574ae0a2876ee94e4fe617f878407bf818c2df0
"hurd: Implement sigreturn for x86_64"

Checked on x86_64-gnu.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Message-Id: <20230515083323.1358039-5-bugaevc@gmail.com>
Diffstat (limited to 'sysdeps/mach')
-rw-r--r--sysdeps/mach/hurd/x86_64/sigreturn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/mach/hurd/x86_64/sigreturn.c b/sysdeps/mach/hurd/x86_64/sigreturn.c
index 82247e3c3e..5d3a4d31dc 100644
--- a/sysdeps/mach/hurd/x86_64/sigreturn.c
+++ b/sysdeps/mach/hurd/x86_64/sigreturn.c
@@ -126,7 +126,7 @@ __sigreturn (struct sigcontext *scp)
        copy the registers onto the user's stack, switch there, pop and
        return.  */
 
-    uintptr_t *usp = (uintptr_t *) scp->sc_ursp - 128;
+    uintptr_t *usp = (uintptr_t *) (scp->sc_ursp - 128);
 
     *--usp = scp->sc_rip;
     *--usp = scp->sc_rfl;