pgbench - segmentation fault

Started by Julius Stroffekover 18 years ago2 messagesbugs
Jump to latest
#1Julius Stroffek
Julius.Stroffek@Sun.COM

Hi,

pgbench contrib module is doing segmentation fault on Solaris
when -d option is specified without -p option specified.

This is because the -d option dumps the connection information
and the default value of pgport variable is NULL which causes
segmentation fault on Solaris when NULL is passed to printf
function.

Attached is a trivial patch that changes the default value of pgport
to empty string. PQsetdbLogin function does not make any difference
between NULL and empty string.

Regards

Julo

Attachments:

pgbench_fix.patchtext/x-patch; name=pgbench_fix.patchDownload+2-2
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Julius Stroffek (#1)
Re: pgbench - segmentation fault

Julius Stroffek <Julius.Stroffek@Sun.COM> writes:

pgbench contrib module is doing segmentation fault on Solaris
when -d option is specified without -p option specified.

Applied in HEAD and 8.2. Thanks for the report!

regards, tom lane