Re: Seg fault in pgbench

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Seg fault in pgbench
Дата
Msg-id 20160212202259.GA574470@alvherre.pgsql
обсуждение исходный текст
Ответ на Seg fault in pgbench  (Jeff Janes <jeff.janes@gmail.com>)
Ответы Re: Seg fault in pgbench  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-hackers
Jeff Janes wrote:
> If I give pgbench an empty file, I get a segfault.
> 
> $ touch empty.sql
> $ src/bin/pgbench/pgbench -T 60 -f empty.sql
> starting vacuum...end.
> Segmentation fault (core dumped)

I fixed this by checking whether the first command is NULL; originally
this case was handled by checking whether the command list itself was
NULL.  It could also be fixed by having process_file() return NULL in
the case of an command-less file, but it seemed more churn for no actual
reason, since the case is going to be rejected by exiting the program
anyway.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: proposal: schema PL session variables
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: schema PL session variables