]> git.ipfire.org Git - thirdparty/make.git/commitdiff
* main.c (main): [SV 48009] Reset stack limit for make re-exec.
authorJeremy Devenport <jeremy.devenport@gmail.com>
Tue, 31 May 2016 07:09:24 +0000 (03:09 -0400)
committerPaul Smith <psmith@gnu.org>
Tue, 31 May 2016 07:17:26 +0000 (03:17 -0400)
Copyright-paperwork-exempt: yes

main.c

diff --git a/main.c b/main.c
index e606488075a639ad20eb539864f6fac2ead666c2..fa8045fd32f1c65d233b2feef80e6ffcac6a7412 100644 (file)
--- 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);