- Reset stack size if re-execing make.
This commit is contained in:
Patsy Franklin 2017-02-16 17:28:28 -05:00
parent 3fc63a36eb
commit 4314a1b10e
2 changed files with 38 additions and 1 deletions

29
make-bz1386809.patch Normal file
View File

@ -0,0 +1,29 @@
From a3d8c086d54c112fecfa2b9026a32a14f741f5f5 Mon Sep 17 00:00:00 2001
From: Jeremy Devenport <jeremy.devenport@gmail.com>
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

View File

@ -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 <pfrankli@redhat.com> 1:4.1-6
- Reset stack limit on re-exec.
Resolves: #1386809
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild