On Tue, Jul 12, 2016 at 11:40 AM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
> On Tue, Jul 12, 2016 at 10:58 AM, <david(at)gravitext(dot)com> wrote:
>> The following bug has been logged on the website:
>>
>> Bug reference: 14245
>>
>> I am doing some (fuzz) testing of full text queries and managed to
>> generate the following case which causes a SEGFAULT on PostgreSQL
>> 9.6
>> beta1 and beta2:
>>
>> select to_tsquery('!(a & !b) & c') as tsquery
>
> Interesting discovery. How did you fuzz test?
Motivated by the new phrase search support in 9.6, I'm working on a
query language which is lenient to any user input when parsed and can
be transformed and output to PG tsquery syntax. The fuzz testing is by
randomly permuted fragments in the custom query language. Using this,
I found and fixed a bunch of issues in my own parser, and identified
lots of characters to treat as whitespace and filter before output to
tsquery, before stumbling on this Postgres crash.