Re: [HACKERS] [sqlsmith] Crash on GUC serialization

2016-11-19 Thread Tom Lane
Robert Haas writes: > On Sat, Nov 19, 2016 at 12:31 PM, Tom Lane wrote: >> 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 ... > Why do we allow this, anyway? I think it simplifie

Re: [HACKERS] [sqlsmith] Crash on GUC serialization

2016-11-19 Thread Robert Haas
On Sat, Nov 19, 2016 at 12:31 PM, Tom Lane wrote: > Andreas Seltenreich 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

Re: [HACKERS] [sqlsmith] Crash on GUC serialization

2016-11-19 Thread Tom Lane
Michael Paquier writes: > On Sat, Nov 19, 2016 at 9:31 AM, Tom Lane wrote: >> 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 was half-way through it when you sent your ema

Re: [HACKERS] [sqlsmith] Crash on GUC serialization

2016-11-19 Thread Michael Paquier
On Sat, Nov 19, 2016 at 9:51 AM, Andreas Seltenreich wrote: > Michael Paquier writes: > >> [2. text/plain; fix-guc-string-eval.patch] > > I'm afraid taking care of the length computation is not sufficient. > ISTM like it'll still try to serialize the NULL pointer later on in > serialize_variable:

Re: [HACKERS] [sqlsmith] Crash on GUC serialization

2016-11-19 Thread Andreas Seltenreich
Michael Paquier writes: > [2. text/plain; fix-guc-string-eval.patch] I'm afraid taking care of the length computation is not sufficient. ISTM like it'll still try to serialize the NULL pointer later on in serialize_variable: ,[ guc.c:9108 ] | case PGC_STRING: | { | struct config_st

Re: [HACKERS] [sqlsmith] Crash on GUC serialization

2016-11-19 Thread Michael Paquier
On Sat, Nov 19, 2016 at 9:31 AM, Tom Lane wrote: > Andreas Seltenreich 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-

Re: [HACKERS] [sqlsmith] Crash on GUC serialization

2016-11-19 Thread Tom Lane
Andreas Seltenreich 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 be

[HACKERS] [sqlsmith] Crash on GUC serialization

2016-11-19 Thread Andreas Seltenreich
Hi, sqlsmith just made a GUC that tricks the serialization code into dereferencing a nullpointer. Here's a recipe: --8<---cut here---start->8--- set min_parallel_relation_size to 0; set max_parallel_workers_per_gather to 2; set force_parallel_mode to on; begin