vapier 17/03/20 15:06:11
Modified: README.history
Added:
00_all_0046-posix_spawn-fix-stack-setup-on-ia64-BZ-21275.patch
Log:
add fix from upstream for posix_spawn crashes on ia64 #613288
Revision Changes Path
1.6 src/patchsets/glibc/2.24/README.history
file :
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.24/README.history?rev=1.6&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.24/README.history?rev=1.6&content-type=text/plain
diff :
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.24/README.history?r1=1.5&r2=1.6
Index: README.history
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/glibc/2.24/README.history,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- README.history 9 Feb 2017 16:24:59 -0000 1.5
+++ README.history 20 Mar 2017 15:06:11 -0000 1.6
@@ -1,3 +1,6 @@
+6 20 Mar 2017
+ + 00_all_0046-posix_spawn-fix-stack-setup-on-ia64-BZ-21275.patch
+
5 09 Feb 2017
+ 00_all_0044-X86_64-Don-t-use-PLT-nor-GOT-in-static-archives-BZ-2.patch
+ 00_all_0045-Revert-sys-types.h-drop-sys-sysmacros.h-include.patch
1.1
src/patchsets/glibc/2.24/00_all_0046-posix_spawn-fix-stack-setup-on-ia64-BZ-21275.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.24/00_all_0046-posix_spawn-fix-stack-setup-on-ia64-BZ-21275.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.24/00_all_0046-posix_spawn-fix-stack-setup-on-ia64-BZ-21275.patch?rev=1.1&content-type=text/plain
Index: 00_all_0046-posix_spawn-fix-stack-setup-on-ia64-BZ-21275.patch
===================================================================
>From d1d39a2ed04e50503676bcf3e4a17080ccd5487b Mon Sep 17 00:00:00 2001
From: Mike Frysinger <[email protected]>
Date: Mon, 20 Mar 2017 04:47:56 -0400
Subject: [PATCH] posix_spawn: fix stack setup on ia64 [BZ #21275]
The ia64-specific clone2 call expects the base of the stack mapping and
the stack size as sep arguments, not an initial stack value as on other
stack-grows-down architectures. Reuse the stack-grows-up macro so we
pass in the right stack base.
Reported-by: Matt Turner <[email protected]>
(cherry picked from commit ddc3fb333469c2997798742dc0509dc1e3201d91)
(cherry picked from commit 7043946c7921c0e3850dd2b3d948336624bb0f62)
---
sysdeps/unix/sysv/linux/spawni.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/spawni.c b/sysdeps/unix/sysv/linux/spawni.c
index 67e1c42426cf..c946120c3443 100644
--- a/sysdeps/unix/sysv/linux/spawni.c
+++ b/sysdeps/unix/sysv/linux/spawni.c
@@ -59,17 +59,18 @@
#define SPAWN_ERROR 127
#ifdef __ia64__
-# define CLONE(__fn, __stack, __stacksize, __flags, __args) \
- __clone2 (__fn, __stack, __stacksize, __flags, __args, 0, 0, 0)
+# define CLONE(__fn, __stackbase, __stacksize, __flags, __args) \
+ __clone2 (__fn, __stackbase, __stacksize, __flags, __args, 0, 0, 0)
#else
# define CLONE(__fn, __stack, __stacksize, __flags, __args) \
__clone (__fn, __stack, __flags, __args)
#endif
-#if _STACK_GROWS_DOWN
-# define STACK(__stack, __stack_size) (__stack + __stack_size)
-#elif _STACK_GROWS_UP
+/* Since ia64 wants the stackbase w/clone2, re-use the grows-up macro. */
+#if _STACK_GROWS_UP || defined (__ia64__)
# define STACK(__stack, __stack_size) (__stack)
+#elif _STACK_GROWS_DOWN
+# define STACK(__stack, __stack_size) (__stack + __stack_size)
#endif
--
2.12.0