From 44a6217c263c14b7dce33fec4d41df59725e4963 Mon Sep 17 00:00:00 2001 From: Manoj Srivastava Date: Mon, 12 Feb 2018 14:53:15 -0800 Subject: [PATCH] [master]: NMU to ensure the stack limit is reset when make re-execs itself. Signed-off-by: Manoj Srivastava --- debian/changelog | 8 ++++++++ main.c | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7aa49a86..cca09781 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +make-dfsg (4.1-9.1) unstable; urgency=medium + + * Non-maintainer upload. + * Ensure the stack limit is reset when make re-execs itself. + (Closes: #853213) + + -- James Cowgill Tue, 31 Jan 2017 16:31:57 +0000 + make-dfsg (4.1-9) unstable; urgency=low * Reword the manual page. While the wording included in the manual page diff --git a/main.c b/main.c index 4163622d..897bb191 100644 --- a/main.c +++ b/main.c @@ -2423,6 +2423,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);