--describe-config crashes

Started by Zdenek Kotalaover 18 years ago3 messagespatches
Jump to latest
#1Zdenek Kotala
Zdenek.Kotala@Sun.COM

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

thanks Zdenek

Attachments:

describe.patchtext/x-patch; name=describe.patchDownload+2-2
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Zdenek Kotala (#1)
Re: --describe-config crashes

Zdenek Kotala <Zdenek.Kotala@Sun.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

#3Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#2)
Re: --describe-config crashes

Tom Lane wrote:

Zdenek Kotala <Zdenek.Kotala@Sun.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@momjian.us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com

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