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:20 +0300
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-05-16 16:08:45 +0200
commitff0f87632a74a369a2b992f4436ae406065a4012 (patch)
tree36de7e8fd7b0c6df8e44d4b2bab186dba0e12fad /sysdeps/mach
parent40b68e8cc00ca40348bc084b651c0561d31feb46 (diff)
downloadglibc-ff0f87632a74a369a2b992f4436ae406065a4012.tar.gz
glibc-ff0f87632a74a369a2b992f4436ae406065a4012.tar.xz
glibc-ff0f87632a74a369a2b992f4436ae406065a4012.zip
hurd: Fix aligning signal stack pointer
Fixes 60f9bf974694d50daf58d46347b06a5975ac5ddd
"hurd: Port trampoline.c to x86_64"

Checked on x86_64-gnu.

Reported-by: Bruno Haible <bruno@clisp.org>
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Message-Id: <20230515083323.1358039-2-bugaevc@gmail.com>
Diffstat (limited to 'sysdeps/mach')
-rw-r--r--sysdeps/mach/hurd/x86/trampoline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/mach/hurd/x86/trampoline.c b/sysdeps/mach/hurd/x86/trampoline.c
index e13c5d85f5..19bddad8e1 100644
--- a/sysdeps/mach/hurd/x86/trampoline.c
+++ b/sysdeps/mach/hurd/x86/trampoline.c
@@ -200,7 +200,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action
   /* Align SP at 16 bytes.  Coupled with the fact that sigreturn_addr is
      16-byte aligned within the stackframe struct, this ensures that it ends
      up on a 16-byte aligned address, as required by the ABI.  */
-  sigsp = (void *) ((uintptr_t) sigsp & 16UL);
+  sigsp = (void *) ((uintptr_t) sigsp & ~15UL);
 #endif
 
   /* Push the arguments to call `trampoline' on the stack.  */