From 4314a1b10ead1c0104e1e82afd889a4f0d377040 Mon Sep 17 00:00:00 2001 From: Patsy Franklin Date: Thu, 16 Feb 2017 17:28:28 -0500 Subject: [PATCH] Resolves: #1386809 - Reset stack size if re-execing make. --- make-bz1386809.patch | 29 +++++++++++++++++++++++++++++ make.spec | 10 +++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 make-bz1386809.patch diff --git a/make-bz1386809.patch b/make-bz1386809.patch new file mode 100644 index 0000000..a85296f --- /dev/null +++ b/make-bz1386809.patch @@ -0,0 +1,29 @@ +From a3d8c086d54c112fecfa2b9026a32a14f741f5f5 Mon Sep 17 00:00:00 2001 +From: Jeremy Devenport +Date: Tue, 31 May 2016 03:09:24 -0400 +Subject: * main.c (main): [SV 48009] Reset stack limit for make re-exec. + +Copyright-paperwork-exempt: yes +--- + main.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/main.c b/main.c +index e606488..fa8045f 100644 +--- a/main.c ++++ b/main.c +@@ -2454,6 +2454,11 @@ main (int argc, char **argv, char **envp) + exit (WIFEXITED(r) ? WEXITSTATUS(r) : EXIT_FAILURE); + } + #else ++#ifdef SET_STACK_SIZE ++ /* Reset limits, if necessary. */ ++ if (stack_limit.rlim_cur) ++ setrlimit (RLIMIT_STACK, &stack_limit); ++#endif + exec_command ((char **)nargv, environ); + #endif + free (aargv); +-- +cgit v1.0-41-gc330 + diff --git a/make.spec b/make.spec index 803feb6..ef38bb5 100644 --- a/make.spec +++ b/make.spec @@ -3,7 +3,7 @@ Summary: A GNU tool which simplifies the build process for users Name: make Epoch: 1 Version: 4.1 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv3+ Group: Development/Tools URL: http://www.gnu.org/software/make/ @@ -30,6 +30,9 @@ Patch5: make-4.0-weird-shell.patch # make seg faults when run with no arguments Patch6: make-4.1-rh1277968.patch +# Reset stack limit on re-exec'd make. +Patch7: make-bz1386809.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(post): /sbin/install-info Requires(preun): /sbin/install-info @@ -60,6 +63,7 @@ The make-devel package contains gnumake.h. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 rm -f tests/scripts/features/parallelism.orig @@ -109,6 +113,10 @@ fi %{_includedir}/gnumake.h %changelog +* Wed Feb 15 2017 Patsy Franklin 1:4.1-6 +- Reset stack limit on re-exec. + Resolves: #1386809 + * Thu Feb 04 2016 Fedora Release Engineering - 1:4.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild