From: Bradley Nicholes Date: Fri, 13 Jul 2001 19:45:52 +0000 (+0000) Subject: NetWare has a fixed lengh stack. Since MAX_STRING_LEN is set X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fd6248a360f6dc559a6a0d2e14a7eb9e5fb7b53;p=thirdparty%2Fapache%2Fhttpd.git NetWare has a fixed lengh stack. Since MAX_STRING_LEN is set to 8k, one call to send_parsed_content() chews up 24k of stack space. During a server-side include evaluation this function is called recusively, allocating 24k each time. Obviously it doesn't take long to blow a 64k stack which is the default for Apache for NetWare. Since MAX_STRING_LEN is used all throughout the Apache code, we should rethink using a default of 8k especially in recursive functions. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@89548 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/modules/standard/mod_include.c b/src/modules/standard/mod_include.c index c9a3f7424a6..e09d572333a 100644 --- a/src/modules/standard/mod_include.c +++ b/src/modules/standard/mod_include.c @@ -2170,8 +2170,22 @@ static int handle_printenv(FILE *in, request_rec *r, const char *error) static void send_parsed_content(FILE *f, request_rec *r) { +#ifdef NETWARE + /* NetWare has a fixed lengh stack. Since MAX_STRING_LEN is set + to 8k, one call to this function allocates 24k of stack space. + During a server-side include evaluation this function is + called recusively, allocating 24k each time. Obviously it + doesn't take long to blow a 64k stack which is the default + for Apache for NetWare. Since MAX_STRING_LEN is used all + throughout the Apache code, we should rethink using a default + of 8k especially in recursive functions. + */ + char directive[512], error[512]; + char timefmt[512]; +#else char directive[MAX_STRING_LEN], error[MAX_STRING_LEN]; char timefmt[MAX_STRING_LEN]; +#endif int noexec = ap_allow_options(r) & OPT_INCNOEXEC; int ret, sizefmt; int if_nesting;