File: forkfd_grow_stack_upwards_on_hppa.patch

package info (click to toggle)
qt6-base 6.9.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 317,244 kB
  • sloc: cpp: 2,117,791; ansic: 382,065; xml: 142,588; python: 21,637; java: 8,805; asm: 4,009; javascript: 2,290; sh: 1,651; perl: 1,028; makefile: 131
file content (27 lines) | stat: -rw-r--r-- 905 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Description: Change how stack grows on HPPA.
 On HPPA stack grows upwards. This patch introduces this change for
 this 3rd party code.
Author: John David Anglin <dave.anglin@bell.net>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1042018
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>
Last-Update: 2023-07-28

---
 src/3rdparty/forkfd/forkfd_linux.c |    5 +++++
 1 file changed, 5 insertions(+)

--- 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 *ppi
     }
     *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)