1 |
commit: c611133fd67da12a870fb9a64c8e8ae298df0e42 |
2 |
Author: Peter Levine <plevine457 <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Sep 25 21:37:13 2017 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 9 16:10:00 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c611133f |
7 |
|
8 |
dev-cpp/gtest: Fix test failure with sandbox |
9 |
|
10 |
Bug: https://bugs.gentoo.org/629620 |
11 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
12 |
|
13 |
.../files/gtest-1.8.0-increase-clone-stack-size.patch | 14 ++++++++++++++ |
14 |
dev-cpp/gtest/gtest-1.8.0.ebuild | 1 + |
15 |
dev-cpp/gtest/gtest-9999.ebuild | 1 + |
16 |
3 files changed, 16 insertions(+) |
17 |
|
18 |
diff --git a/dev-cpp/gtest/files/gtest-1.8.0-increase-clone-stack-size.patch b/dev-cpp/gtest/files/gtest-1.8.0-increase-clone-stack-size.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..22ac0b6d4a1 |
21 |
--- /dev/null |
22 |
+++ b/dev-cpp/gtest/files/gtest-1.8.0-increase-clone-stack-size.patch |
23 |
@@ -0,0 +1,14 @@ |
24 |
+Bug: https://bugs.gentoo.org/629620 |
25 |
+Upstream PR: https://github.com/google/googletest/pull/1274 |
26 |
+ |
27 |
+--- a/googletest/src/gtest-death-test.cc |
28 |
++++ b/googletest/src/gtest-death-test.cc |
29 |
+@@ -1070,7 +1070,7 @@ |
30 |
+ |
31 |
+ if (!use_fork) { |
32 |
+ static const bool stack_grows_down = StackGrowsDown(); |
33 |
+- const size_t stack_size = getpagesize(); |
34 |
++ const size_t stack_size = getpagesize() * 10; |
35 |
+ // MMAP_ANONYMOUS is not defined on Mac, so we use MAP_ANON instead. |
36 |
+ void* const stack = mmap(NULL, stack_size, PROT_READ | PROT_WRITE, |
37 |
+ MAP_ANON | MAP_PRIVATE, -1, 0); |
38 |
|
39 |
diff --git a/dev-cpp/gtest/gtest-1.8.0.ebuild b/dev-cpp/gtest/gtest-1.8.0.ebuild |
40 |
index 308a12ff6fd..afb24f111d5 100644 |
41 |
--- a/dev-cpp/gtest/gtest-1.8.0.ebuild |
42 |
+++ b/dev-cpp/gtest/gtest-1.8.0.ebuild |
43 |
@@ -24,6 +24,7 @@ PATCHES=( |
44 |
"${FILESDIR}"/${PN}-9999-fix-py-tests.patch |
45 |
"${FILESDIR}"/${PN}-9999-fix-gcc6-undefined-behavior.patch |
46 |
"${FILESDIR}"/${PN}-1.8.0-multilib-strict.patch |
47 |
+ "${FILESDIR}"/${PN}-1.8.0-increase-clone-stack-size.patch |
48 |
) |
49 |
|
50 |
S="${WORKDIR}"/googletest-release-${PV} |
51 |
|
52 |
diff --git a/dev-cpp/gtest/gtest-9999.ebuild b/dev-cpp/gtest/gtest-9999.ebuild |
53 |
index a4ab55ca6f1..79195676d08 100644 |
54 |
--- a/dev-cpp/gtest/gtest-9999.ebuild |
55 |
+++ b/dev-cpp/gtest/gtest-9999.ebuild |
56 |
@@ -29,6 +29,7 @@ RDEPEND="!dev-cpp/gmock" |
57 |
|
58 |
PATCHES=( |
59 |
"${FILESDIR}"/${PN}-9999-fix-gcc6-undefined-behavior.patch |
60 |
+ "${FILESDIR}"/${PN}-1.8.0-increase-clone-stack-size.patch |
61 |
) |
62 |
|
63 |
pkg_setup() { |