dev-cpp/gtest: Fix test failure with sandbox

Bug: https://bugs.gentoo.org/629620
Package-Manager: Portage-2.3.6, Repoman-2.3.2
This commit is contained in:
Peter Levine
2017-09-25 17:37:13 -04:00
committed by Mike Gilbert
parent de6ec6b8bc
commit c611133fd6
3 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
Bug: https://bugs.gentoo.org/629620
Upstream PR: https://github.com/google/googletest/pull/1274
--- a/googletest/src/gtest-death-test.cc
+++ b/googletest/src/gtest-death-test.cc
@@ -1070,7 +1070,7 @@
if (!use_fork) {
static const bool stack_grows_down = StackGrowsDown();
- const size_t stack_size = getpagesize();
+ const size_t stack_size = getpagesize() * 10;
// MMAP_ANONYMOUS is not defined on Mac, so we use MAP_ANON instead.
void* const stack = mmap(NULL, stack_size, PROT_READ | PROT_WRITE,
MAP_ANON | MAP_PRIVATE, -1, 0);

View File

@@ -24,6 +24,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-9999-fix-py-tests.patch
"${FILESDIR}"/${PN}-9999-fix-gcc6-undefined-behavior.patch
"${FILESDIR}"/${PN}-1.8.0-multilib-strict.patch
"${FILESDIR}"/${PN}-1.8.0-increase-clone-stack-size.patch
)
S="${WORKDIR}"/googletest-release-${PV}

View File

@@ -29,6 +29,7 @@ RDEPEND="!dev-cpp/gmock"
PATCHES=(
"${FILESDIR}"/${PN}-9999-fix-gcc6-undefined-behavior.patch
"${FILESDIR}"/${PN}-1.8.0-increase-clone-stack-size.patch
)
pkg_setup() {