pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: david@gravitext.com
Cc: pgsql-bugs@postgresql.org, Teodor Sigaev <teodor@sigaev.ru>
Subject: Re: BUG #14245: Segfault on weird to_tsquery
Date: Tue, 12 Jul 2016 15:42:25 -0400
Message-ID: <2157.1468352545@sss.pgh.pa.us> (raw)
In-Reply-To: <20160712175855.1414.10498@wrigleys.postgresql.org>
References: <20160712175855.1414.10498@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

david@gravitext.com writes:
> 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
> This weird query outputs the following on 9.5.2, instead of crashing:
> "!( !'b' ) & 'c'"

Note that while crashing is certainly not good, the pre-9.6 behavior
can hardly be called correct either.  What happened to 'a'?

Also, it looks like this is specific to to_tsquery; if you just feed
the same thing to tsqueryin, it seems fine with it:

# select '!(a & !b) & c'::tsquery;
        tsquery        
-----------------------
 !( 'a' & !'b' ) & 'c'
(1 row)

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (10+ messages)  latest in thread

Message-ID: <2157.1468352545@sss.pgh.pa.us>
Permalink:  ../2157.1468352545@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2157.1468352545@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, david@gravitext.com, teodor@sigaev.ru
  Subject: Re: BUG #14245: Segfault on weird to_tsquery
  In-Reply-To: <2157.1468352545@sss.pgh.pa.us>
  References: <20160712175855.1414.10498@wrigleys.postgresql.org> <2157.1468352545@sss.pgh.pa.us>

* 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