From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
Subject: | Re: Seg fault in pgbench |
Date: | 2016-02-12 22:12:26 |
Message-ID: | CAMkU=1z_WUfQ_ygwvDwE9mM4XOiv71yECSTayqnGVaqWAvjnvQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Feb 12, 2016 at 12:22 PM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> 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.
>
Looks good. Thanks.
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2016-02-12 22:25:34 | Re: NextXID format change (was Re: exposing pg_controldata and pg_config as functions) |
Previous Message | Tom Lane | 2016-02-12 21:59:14 | Re: Re: [COMMITTERS] pgsql: Add some isolation tests for deadlock detection and resolution. |