[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix overflow in jobs
From: |
Natanael Copa |
Subject: |
Re: [PATCH] Fix overflow in jobs |
Date: |
Wed, 7 Feb 2018 19:51:14 +0100 |
Hi,
On Fri, 8 Dec 2017 08:04:00 -0500
Chet Ramey <chet.ramey@case.edu> wrote:
> On 12/7/17 5:36 PM, Natanael Copa wrote:
> > This fixes an issue with bash hanging if user process rlimit is too
> > high.
>
> Thanks for the report.
>
Unfortunately, the proposed patch does not fix the case for 32 bit
architectures.
The bug was introduced with commit a0c0a00f[1].
I think the proper fix may be re-enable the js.c_childmax capping. What
do you think?
diff --git a/jobs.c b/jobs.c
index cef3c79..bf99266 100644
--- a/jobs.c
+++ b/jobs.c
@@ -4166,10 +4166,8 @@ initialize_job_control (force)
if (js.c_childmax < 0)
js.c_childmax = DEFAULT_CHILD_MAX;
-#if 0
if (js.c_childmax > MAX_CHILD_MAX)
js.c_childmax = MAX_CHILD_MAX;
-#endif
return job_control;
}
@@ -4547,10 +4545,8 @@ mark_dead_jobs_as_notified (force)
if (js.c_childmax < 0)
js.c_childmax = DEFAULT_CHILD_MAX;
-#if 0
if (js.c_childmax > MAX_CHILD_MAX)
js.c_childmax = MAX_CHILD_MAX;
-#endif
/* Don't do anything if the number of dead processes is less than CHILD_MAX
and we're not forcing a cleanup. */
[1]:
http://git.savannah.gnu.org/cgit/bash.git/commit/?id=a0c0a00fc419b7bc08202a79134fcd5bc0427071
- Re: [PATCH] Fix overflow in jobs,
Natanael Copa <=