--- /dev/null
+Bug: https://bugs.gentoo.org/688162
+Upstream PR: https://github.com/google/googletest/pull/2276
+
+--- a/googletest/src/gtest-death-test.cc
++++ b/googletest/src/gtest-death-test.cc
+@@ -1357,6 +1357,9 @@ static pid_t ExecDeathTestSpawnChild(char* const* argv, int close_fd) {
+ const auto stack_size = static_cast<size_t>(getpagesize());
+ // MMAP_ANONYMOUS is not defined on Mac, so we use MAP_ANON instead.
+ void* const stack = mmap(nullptr, stack_size, PROT_READ | PROT_WRITE,
++# if GTEST_OS_LINUX
++ (stack_grows_down ? MAP_GROWSDOWN : 0) | // Needed for stack auto-resizing
++# endif
+ MAP_ANON | MAP_PRIVATE, -1, 0);
+ GTEST_DEATH_TEST_CHECK_(stack != MAP_FAILED);
+
+++ /dev/null
-Bug: https://bugs.gentoo.org/629620
-Upstream PR: https://github.com/google/googletest/pull/2276
-
---- a/googletest/src/gtest-death-test.cc
-+++ b/googletest/src/gtest-death-test.cc
-@@ -1354,7 +1354,7 @@
-
- if (!use_fork) {
- static const bool stack_grows_down = StackGrowsDown();
-- const auto stack_size = static_cast<size_t>(getpagesize());
-+ const auto stack_size = static_cast<size_t>(getpagesize() * 8);
- // MMAP_ANONYMOUS is not defined on Mac, so we use MAP_ANON instead.
- void* const stack = mmap(nullptr, stack_size, PROT_READ | PROT_WRITE,
- MAP_ANON | MAP_PRIVATE, -1, 0);
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
RDEPEND="!dev-cpp/gmock"
PATCHES=(
- "${FILESDIR}"/${PN}-9999-increase-clone-stack-size.patch
+ "${FILESDIR}"/${PN}-1.9.0_pre20190607-add-mmap-stack-flag.patch
)
pkg_setup() {
RDEPEND="!dev-cpp/gmock"
PATCHES=(
- "${FILESDIR}"/${PN}-9999-increase-clone-stack-size.patch
+ "${FILESDIR}"/${PN}-1.9.0_pre20190607-add-mmap-stack-flag.patch
)
pkg_setup() {