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 setting up signal thread stack alignment Date: Sat, 27 May 2023 22:32:07 +0000 (GMT) [thread overview] Message-ID: <20230527223207.6F0F03858D3C@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9ffdcf5b79acacffc35506812ca8d99ea1dde618 commit 9ffdcf5b79acacffc35506812ca8d99ea1dde618 Author: Samuel Thibault <samuel.thibault@ens-lyon.org> Date: Sun May 28 00:29:14 2023 +0200 hurd: Fix setting up signal thread stack alignment x86_64 needs special alignment when calling functions, so we have to use MACHINE_THREAD_STATE_SETUP_CALL for the signal thread when forking. Diff: --- sysdeps/mach/hurd/_Fork.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sysdeps/mach/hurd/_Fork.c b/sysdeps/mach/hurd/_Fork.c index 77cd29171e..9981699a5a 100644 --- a/sysdeps/mach/hurd/_Fork.c +++ b/sysdeps/mach/hurd/_Fork.c @@ -481,13 +481,11 @@ retry: MACHINE_THREAD_STATE_FLAVOR, (natural_t *) &state, &statecount)) LOSE; -#ifdef STACK_GROWTH_UP - state.SP = __hurd_sigthread_stack_base; -#else - state.SP = __hurd_sigthread_stack_end; -#endif - MACHINE_THREAD_STATE_SET_PC (&state, - (unsigned long int) _hurd_msgport_receive); + + MACHINE_THREAD_STATE_SETUP_CALL(&state, + __hurd_sigthread_stack_base, + __hurd_sigthread_stack_end - __hurd_sigthread_stack_base, + (uintptr_t) _hurd_msgport_receive); /* Do special signal thread setup for TLS if needed. */ if (err = _hurd_tls_fork (sigthread, _hurd_msgport_thread, &state))
reply other threads:[~2023-05-27 22:32 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=20230527223207.6F0F03858D3C@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: linkBe 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).