httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Förtsch <>
Subject Bug in mod_log_config
Date Thu, 03 Mar 2011 12:44:57 GMT

mod_log_config contains these lines

static const char *set_buffered_logs_on(cmd_parms *parms, void *dummy, int 
    buffered_logs = flag;
    if (buffered_logs) {
    return NULL;

The buffered_logs global variable reflects the BufferedLogs directive.

Now, if my config file contains the 2 lines

  BufferedLogs On
  BufferedLogs Off

in that order the first directive turns buffered logs on and sets the writer 
functions. The 2nd directive turns the buffered_logs flag off but doesn't 
reset the writer functions. Hence, if your config contains those lines the 
httpd will segfault at startup.

Further, when mod_log_config is compiled as a shared module it is unloaded and 
the global variables buffered_logs, log_writer and log_writer_init are reset 
during a restart via SIG{HUP,USR1}. But if the module is compiled statically 
those global variables keep their values and a similar situation as described 
above can appear.

I have found that in 2.2.17. But I have verified it is also present in trunk.

The enclosed patch cures the problem.

Torsten Förtsch

Need professional modperl support? Hire me! (

Like fantasy?

View raw message