httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <r...@imdb.com>
Subject Re: WWW Form Bug Report: "mod_include broken in v.1.1.1" on Irix
Date Fri, 06 Sep 1996 19:58:59 GMT
Database Owner wrote:
>
>Rob,
>	I've traced the problem in apache.  It has to do with errors that occur
>during parse_htaccess due to invalid commands found in .htaccess files.  See my
>workaround below.

Thanks. Again I'll pass the info on so that it can be considered for the
next release. It looks as if there should be some safety checks for the
null pointer in "log_reason" instead of trying to work around cases when
it's null, but I'll leave that to the guys who are more familiar with the
code.

cheers,
rob

>The problem occurs in parse_htaccess in mod_config.c:
>
>    if((f=pfopen(r->pool, filename, "r"))) {
>        dc = create_per_dir_config (r->pool);
>
>        parms.infile = f;
>	parms.config_file = filename;
>
>	errmsg = srm_command_loop (&parms, dc);
>
>        pfclose(r->pool, f);
>
>	if (errmsg) {
>	  int doassign = 0;
>
>	/* INSERT THIS HERE! */
>	  if (!r->per_dir_config) {
>	    r->per_dir_config = dc;
>	    doassign = 1;
>	  }
>	/* done. */
>	  log_reason (errmsg, filename, r);
>	/* INSERT THIS HERE! */
>	  if (doassign) {
>	    r->per_dir_config = NULL;
>	  }
>	/* done. */
>
>	  return SERVER_ERROR;
>	}
>
>
>So you can see that log_reason is sometimes passed a request_rec with a null
>per_dir_config pointer.  This causes a crash later.  Below is a more complete
>debug of the situation: (Note that the line numbers may be off by one or two.)
>
>[4] Process  4277 (apachetest) stopped on signal SIGSEGV: Segmentation
>violation (default) at [get_module_config:109 +0x10,0x410a2c]
>Process  4277 (apachetest) stopped on signal SIGSEGV: Segmentation violation
>(default) at [get_module_config:109 +0x10,0x410a2c]
>	 Source (of /Array/ARCHIVE/apache/apache_1.1.1/src/http_config.c) not
>available for Process  4277
>(dbx) (dbx) (dbx) (dbx) (dbx) (dbx) (dbx) (dbx) (dbx) (dbx) (dbx) (dbx) (dbx)
>(dbx) (dbx) (dbx) (dbx) (dbx) (dbx) (dbx) (dbx) (dbx) (dbx) (dbx) (dbx) (dbx)
>(dbx) (dbx) get_module_config(conf_vector = (nil), m = 0x1000053c)
>["/Array/ARCHIVE/apache/apache_1.1.1/src/http_config.c":109, 0x410a2c]
>confv = (nil)
>(dbx) >  0 get_module_config(conf_vector = (nil), m = 0x1000053c)
>["/Array/ARCHIVE/apache/apache_1.1.1/src/http_config.c":109, 0x410a2c]
>   1 get_remote_host(conn = 0x10013c68, dir_config = (nil), type = 1)
>["/Array/ARCHIVE/apache/apache_1.1.1/src/http_core.c":272, 0x40eae0]
>   2 log_reason(reason = 0x1001cb38 = "Invalid command ExpiresActive", file =
>0x1001cac8 = "/data/disk4/WWW/Sizzle/members/chat/.htaccess", r = 0x1001c460)
>["/Array/ARCHIVE/apache/apache_1.1.1/src/http_log.c":186, 0x415578]
>   3 parse_htaccess(result = 0x7ffe8bbc, r = 0x1001c460, override = 31, d =
>0x1001caa0 = "/data/disk4/WWW/Sizzle/members/chat/", filename = 0x1001cac8 =
>"/data/disk4/WWW/Sizzle/members/chat/.htaccess")
>["/Array/ARCHIVE/apache/apache_1.1.1/src/http_config.c":611, 0x412430]
>   4 directory_walk(r = 0x1001c460)
>["/Array/ARCHIVE/apache/apache_1.1.1/src/http_request.c":329, 0x41345c]
>   5 sub_req_lookup_uri(new_file = 0x1000d3c0 = "chat/sexmain.html", r =
>0x10013cd0) ["/Array/ARCHIVE/apache/apache_1.1.1/src/http_request.c":515,
>0x413c7c]
>   6 handle_include(in = 0xfb43d94, r = 0x10013cd0, error = 0x7ffeecc0 = "[an
>error occurred while processing this directive]", noexec = 0)
>["/Array/ARCHIVE/apache/apache_1.1.1/src/mod_include.c":392, 0x427980]
>   7 send_parsed_content(f = 0xfb43d94, r = 0x10013cd0)
>["/Array/ARCHIVE/apache/apache_1.1.1/src/mod_include.c":742, 0x428d44]
>   8 send_parsed_file(r = 0x10013cd0)
>["/Array/ARCHIVE/apache/apache_1.1.1/src/mod_include.c":850, 0x429254]
>More (n if no)?
>
>
>
>Hope that this helps!
>
>David Green-Seed
>dgreen@starnetc.com
>Senior Programmer
>Starnet Communications Inc.


Mime
View raw message