Re: Custom variable class segmentation fault

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Custom variable class segmentation fault
Date: 2006-08-13 15:38:09
Message-ID: 200608131538.k7DFc9A20932@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Michael Fuhr wrote:
> The latest HEAD is segfaulting on startup if I have the following
> lines in postgresql.conf:
>
> custom_variable_classes = 'plperl'
> plperl.use_strict = on
>
> If I comment out the second line then the server starts successfully.
> Platform is Solaris 9/sparc.
>
> (gdb) bt
> #0 0xff0340a0 in strcmp () from /usr/lib/libc.so.1
> #1 0x00257504 in verify_config_option (name=0x0, value=0x397258 "on", context=PGC_POSTMASTER, source=PGC_S_FILE, isNewEqual=0xffbff2cb "\001",
> isContextOK=0xffbff2ca "\001\001") at guc.c:5513
> #2 0x0025d3b4 in ProcessConfigFile (context=PGC_POSTMASTER) at guc-file.l:152
> #3 0x0025d80c in SelectConfigFiles (userDoption=0x1 <Address 0x1 out of bounds>, progname=0x390610 "postgres") at guc.c:2867
> #4 0x0019a450 in PostmasterMain (argc=5, argv=0x391240) at postmaster.c:602
> #5 0x001518c8 in main (argc=5, argv=0x391240) at main.c:187

Thanks for the report. This attached, applied patch fixes it. The
problem was that custom variables have _no_ default value for strings on
startup, and the checking code was being too agressive.

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachment Content-Type Size
/bjm/diff text/x-diff 773 bytes

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2006-08-13 15:44:05 Re: [PATCHES] Adding fulldisjunctions to the contrib
Previous Message ohp 2006-08-13 14:14:14 Warthog failing

Browse pgsql-patches by date

  From Date Subject
Next Message David Fetter 2006-08-13 15:44:05 Re: [PATCHES] Adding fulldisjunctions to the contrib
Previous Message Bruce Momjian 2006-08-13 14:07:06 Re: [PATCHES] Adding fulldisjunctions to the contrib