From 7efcd3598e3eb82508d1de40646387a6ec9b2180 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Wed, 28 Jan 2004 15:31:02 +0000 Subject: [PATCH] worker MPM: fix stack overlay bug that could cause the parent process to crash. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102425 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ server/mpm/worker/worker.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index cb491abcf5a..7b3df99b6f8 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.1.0-dev [Remove entries to the current 2.0 section below, when backported] + *) worker MPM: fix stack overlay bug that could cause the parent + process to crash. [Jeff Trawick] + *) Unix MPMs: Stop dropping connections when the file descriptor is at least FD_SETSIZE. [Jeff Trawick] diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c index 874125e603d..25ef239a3e1 100644 --- a/server/mpm/worker/worker.c +++ b/server/mpm/worker/worker.c @@ -1441,7 +1441,8 @@ static void perform_idle_server_maintenance(void) ++idle_thread_count; } } - if (any_dead_threads && totally_free_length < idle_spawn_rate + if (any_dead_threads && totally_free_length < idle_spawn_rate + && free_length < MAX_SPAWN_RATE && (!ps->pid /* no process in the slot */ || ps->quiescing)) { /* or at least one is going away */ if (all_dead_threads) { -- 2.47.3