vapier 17/03/20 15:06:11
Modified: README.history
Added:
00_all_0012-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.3 src/patchsets/glibc/2.25/README.history
file :
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.25/README.history?rev=1.3&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.25/README.history?rev=1.3&content-type=text/plain
diff :
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.25/README.history?r1=1.2&r2=1.3
Index: README.history
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/glibc/2.25/README.history,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- README.history 15 Mar 2017 23:54:35 -0000 1.2
+++ README.history 20 Mar 2017 15:06:11 -0000 1.3
@@ -1,3 +1,6 @@
+3 20 Mar 2017
+ + 00_all_0012-posix_spawn-fix-stack-setup-on-ia64-BZ-21275.patch
+
2 15 Mar 2017
+ 00_all_0006-Fix-getting-tunable-values-on-big-endian-BZ-21109.patch
+ 00_all_0007-sunrpc-Avoid-use-after-free-read-access-in-clntudp_c.patch
1.1
src/patchsets/glibc/2.25/00_all_0012-posix_spawn-fix-stack-setup-on-ia64-BZ-21275.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.25/00_all_0012-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.25/00_all_0012-posix_spawn-fix-stack-setup-on-ia64-BZ-21275.patch?rev=1.1&content-type=text/plain
Index: 00_all_0012-posix_spawn-fix-stack-setup-on-ia64-BZ-21275.patch
===================================================================
>From 1009e1fd879bbe5d1a84a1c6b752306a551058fb 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 27ab0d9518746dfb59ed2ba59daefc981dc10e38)
---
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 2daf0c5ef040..c96aac889d4b 100644
--- a/sysdeps/unix/sysv/linux/spawni.c
+++ b/sysdeps/unix/sysv/linux/spawni.c
@@ -61,17 +61,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