Re: [sqlsmith] Crash on GUC serialization - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [sqlsmith] Crash on GUC serialization
Date
Msg-id CA+TgmoZb_DYxGeKzS0KcxgjApVpS9=1WiL94tZgJSeKd-27zQg@mail.gmail.com
Whole thread Raw
In response to Re: [sqlsmith] Crash on GUC serialization  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [sqlsmith] Crash on GUC serialization
List pgsql-hackers
On Sat, Nov 19, 2016 at 12:31 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Andreas Seltenreich <seltenreich@gmx.de> writes:
>> sqlsmith just made a GUC that tricks the serialization code into
>> dereferencing a nullpointer.  Here's a recipe:
>
> Thanks for the report!  Looks like the serialization code has overlooked
> the fact that string-valued GUCs can be NULL.  Surprising we didn't
> find that before ...

I had no idea that was possible.  I think if we'd had a regression
test that set a GUC to such a value, I would have caught this in the
raft of bug fixes I submitted around December of last year, so maybe
we should add one.  Why do we allow this, anyway?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: [PATCH] pgpassfile connection option
Next
From: Tom Lane
Date:
Subject: Re: [sqlsmith] Crash on GUC serialization