From 2346211cb7acbadc1f09ef803447af5dd5bb99b7 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Wed, 16 Apr 2025 21:33:04 +0200 Subject: [PATCH] Change how stack grows on HPPA. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1042018 Reviewed-by: Lisandro Damián Nicanor Pérez Meyer Last-Update: 2023-07-28 On HPPA stack grows upwards. This patch introduces this change for this 3rd party code. Gbp-Pq: Name forkfd_grow_stack_upwards_on_hppa.patch --- src/3rdparty/forkfd/forkfd_linux.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/3rdparty/forkfd/forkfd_linux.c b/src/3rdparty/forkfd/forkfd_linux.c index 4dacc191..40b02657 100644 --- a/src/3rdparty/forkfd/forkfd_linux.c +++ b/src/3rdparty/forkfd/forkfd_linux.c @@ -169,7 +169,12 @@ int system_vforkfd(int flags, pid_t *ppid, int (*childFn)(void *), void *token, } *system = 1; +#if defined(__hppa__) + /* Stack grows up */ + pid = clone(childFn, childStack, cloneflags, token, &pidfd, NULL, NULL); +#else pid = clone(childFn, childStack + sizeof(childStack), cloneflags, token, &pidfd, NULL, NULL); +#endif if (pid < 0) return pid; if (ppid) -- 2.30.2