From: John David Anglin Date: Fri, 2 Aug 2024 15:24:23 +0000 (+0300) Subject: Change how stack grows on HPPA. X-Git-Tag: archive/raspbian/6.6.2+dfsg-11+rpi1^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f8db1961af356fcf71053c09f39dea472c13aedc;p=qt6-base.git Change how stack grows on HPPA. 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 --- 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)