hurd: Fix aligning signal stack pointer

Fixes 60f9bf9746
"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>
This commit is contained in:
Sergey Bugaev 2023-05-15 11:33:20 +03:00 committed by Samuel Thibault
parent 40b68e8cc0
commit ff0f87632a

View File

@ -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. */