Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bN3Zf-0005Mz-9O for pgsql-bugs@arkaria.postgresql.org; Tue, 12 Jul 2016 19:42:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bN3Ze-0004Hw-Sd for pgsql-bugs@arkaria.postgresql.org; Tue, 12 Jul 2016 19:42:30 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bN3Ze-0004Hf-Ag for pgsql-bugs@postgresql.org; Tue, 12 Jul 2016 19:42:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bN3Zb-0000D0-DU for pgsql-bugs@postgresql.org; Tue, 12 Jul 2016 19:42:29 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u6CJgP4K002158; Tue, 12 Jul 2016 15:42:25 -0400 From: Tom Lane To: david@gravitext.com cc: pgsql-bugs@postgresql.org, Teodor Sigaev Subject: Re: BUG #14245: Segfault on weird to_tsquery In-reply-to: <20160712175855.1414.10498@wrigleys.postgresql.org> References: <20160712175855.1414.10498@wrigleys.postgresql.org> Comments: In-reply-to david@gravitext.com message dated "Tue, 12 Jul 2016 17:58:55 -0000" Date: Tue, 12 Jul 2016 15:42:25 -0400 Message-ID: <2157.1468352545@sss.pgh.pa.us> X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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