public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Samuel Thibault <sthibaul@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] hurd: Fix aligning signal stack pointer
Date: Tue, 16 May 2023 14:09:16 +0000 (GMT)	[thread overview]
Message-ID: <20230516140916.118CB3858C83@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ff0f87632a74a369a2b992f4436ae406065a4012

commit ff0f87632a74a369a2b992f4436ae406065a4012
Author: Sergey Bugaev <bugaevc@gmail.com>
Date:   Mon May 15 11:33:20 2023 +0300

    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>

Diff:
---
 sysdeps/mach/hurd/x86/trampoline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

                 reply	other threads:[~2023-05-16 14:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230516140916.118CB3858C83@sourceware.org \
    --to=sthibaul@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).