--describe-config crashes

Lists: pgsql-patches
From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: pgsql-patches(at)postgresql(dot)org
Subject: --describe-config crashes
Date: 2008-02-21 17:49:25
Message-ID: 47BDB9A5.20208@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Function printMixedStruct calls printf with NULL argument. It causes
segmentation fault. Please, apply it for 8.3 - 8.1 too.

thanks Zdenek

Attachment Content-Type Size
describe.patch text/x-patch 745 bytes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: --describe-config crashes
Date: 2008-02-21 18:53:13
Message-ID: 13913.1203619993@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:
> Function printMixedStruct calls printf with NULL argument. It causes
> segmentation fault. Please, apply it for 8.3 - 8.1 too.

Ugh, I guess we've only tested --describe-config on platforms where
%s treats a NULL pointer the same as an empty string.

Since that's also effectively the way GUC handles it, I'm inclined
to think we should print NULL as "" not "(NULL)". Otherwise,
will apply.

regards, tom lane


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>, pgsql-patches(at)postgresql(dot)org
Subject: Re: --describe-config crashes
Date: 2008-03-02 20:28:26
Message-ID: 200803022028.m22KSQu03409@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Tom Lane wrote:
> Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:
> > Function printMixedStruct calls printf with NULL argument. It causes
> > segmentation fault. Please, apply it for 8.3 - 8.1 too.
>
> Ugh, I guess we've only tested --describe-config on platforms where
> %s treats a NULL pointer the same as an empty string.
>
> Since that's also effectively the way GUC handles it, I'm inclined
> to think we should print NULL as "" not "(NULL)". Otherwise,
> will apply.

Tom has applied this patch to CVS HEAD and all relevant back-branches.

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

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