pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Kellum <david@gravitext.com>
To: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14245: Segfault on weird to_tsquery
Date: Tue, 12 Jul 2016 12:04:49 -0700
Message-ID: <1468350289.2574.6@smtp.gmail.com> (raw)
In-Reply-To: <CAM3SWZQDo9yiLFg9rnf1W0XwJLeZ9MD56-1iW-ynnHaqFY+SFA@mail.gmail.com>
References: <20160712175855.1414.10498@wrigleys.postgresql.org>
	<CAM3SWZQDo9yiLFg9rnf1W0XwJLeZ9MD56-1iW-ynnHaqFY+SFA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On Tue, Jul 12, 2016 at 11:40 AM, Peter Geoghegan <pg@heroku.com> wrote:
> On Tue, Jul 12, 2016 at 10:58 AM,  <david@gravitext.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.

view thread (10+ messages)  latest in thread

Message-ID: <1468350289.2574.6@smtp.gmail.com>
Permalink:  ../1468350289.2574.6@smtp.gmail.com/
Also on:    postgresql.org/message-id/1468350289.2574.6@smtp.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: david@gravitext.com
  Subject: Re: BUG #14245: Segfault on weird to_tsquery
  In-Reply-To: <1468350289.2574.6@smtp.gmail.com>
  References: <20160712175855.1414.10498@wrigleys.postgresql.org> <CAM3SWZQDo9yiLFg9rnf1W0XwJLeZ9MD56-1iW-ynnHaqFY+SFA@mail.gmail.com> <1468350289.2574.6@smtp.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox