[syslog-ng] rc2 segfaults under linux

Harry Hoffman hhoffman at ip-solutions.net
Thu Sep 14 14:35:50 CEST 2006


Balazs,

Great! Thanks for finding this so quickly :-)  I'll test this today.

Cheers,
Harry

Balazs Scheidler wrote:
> On Wed, 2006-09-13 at 20:03 +0200, Balazs Scheidler wrote:
>> On Wed, 2006-09-13 at 13:56 -0400, Harry Hoffman wrote:
>>> Hi All,
>>>
>>> So I decided to upgrade to rc2 to deal with the fixes for reported
>>> memory leaks.
>>>
>>> Unfortunately, it now segfaults :-(
>>>
>>> Operating environment is Redhat AS3 update 8. eventlog and syslog-ng v2
>>> rc2 are configured with default options.
>>>
> 
> This patch fixes the issue for me (one of the leak fixes caused the
> problem):
> 
> --- orig/src/logwriter.c
> +++ mod/src/logwriter.c
> @@ -485,11 +485,17 @@ log_writer_options_set_template_escape(L
>  void
>  log_writer_options_init(LogWriterOptions *options, GlobalConfig *cfg, guint32 flags, const gchar *stats_name)
>  {
> -  /* NOTE: free everything that might have remained from a previous init
> -   * call, this way init can be called any number of times, without calling
> -   * destroy first */
> +  LogTemplate *template;
> 
> + /* NOTE: free everything that might have remained from a previous init
> +  * call, this way init can be called any number of times, without calling
> +  * destroy first. We only need to keep options->template around as that's
> +  * never initialized based on the configuration
> +  */
> +
> +  template = log_template_ref(options->template);
>    log_writer_options_destroy(options);
> +  options->template = template;
>    options->flags = flags;
>    if (options->fifo_size == -1)
>      options->fifo_size = cfg->log_fifo_size;
> 
> 
> 
> 
> Since I'm leaving for holiday tomorrow, I'm releasing an rc3 with this
> fix included.
> 


More information about the syslog-ng mailing list