You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by bn...@apache.org on 2001/07/13 21:45:56 UTC
cvs commit: apache-1.3/src/modules/standard mod_include.c
bnicholes 01/07/13 12:45:55
Modified: src/modules/standard mod_include.c
Log:
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.
Revision Changes Path
1.129 +14 -0 apache-1.3/src/modules/standard/mod_include.c
Index: mod_include.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_include.c,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -r1.128 -r1.129
--- mod_include.c 2001/02/23 16:37:26 1.128
+++ mod_include.c 2001/07/13 19:45:52 1.129
@@ -2170,8 +2170,22 @@
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;