Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEVOW-0003Ir-JX for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Dec 2016 06:07:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cEVOV-0005Xe-EW for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Dec 2016 06:07:55 +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 1cEVN5-0002y4-7l for pgsql-hackers@postgresql.org; Wed, 07 Dec 2016 06:06:27 +0000 Received: from gauss.credativ.com ([93.94.130.89]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cEVN2-0006xE-L1 for pgsql-hackers@postgresql.org; Wed, 07 Dec 2016 06:06:26 +0000 Received: from gauss.credativ.com (localhost [127.0.0.1]) by gauss.credativ.com (Postfix) with ESMTP id 9D8E31E19D4; Wed, 7 Dec 2016 07:06:21 +0100 (CET) Received: from ex (ip-109-44-3-121.web.vodafone.de [109.44.3.121]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: ase@gauss.credativ.com) by gauss.credativ.com (Postfix) with ESMTPSA id 504051E199F for ; Wed, 7 Dec 2016 07:06:21 +0100 (CET) From: Andreas Seltenreich To: pgsql-hackers@postgresql.org Subject: [sqlsmith] Crash in tsquery_rewrite/QTNBinary Date: Wed, 07 Dec 2016 07:06:15 +0100 Message-ID: <8737i01dew.fsf@credativ.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Hi, the following query crashes master as of 4212cb7. select ts_rewrite( tsquery_phrase( tsquery $$'sanct' & 'peter'$$, tsquery $$'5' <-> '6'$$, 42), tsquery $$'5' <-> '6'$$, plainto_tsquery('I') ); Backtrace below. regards, Andreas Program terminated with signal SIGSEGV, Segmentation fault. #0 QTNBinary (in=0x0) at tsquery_util.c:256 #1 0x0000559debd68643 in QTNBinary (in=0x559ded7cc998) at tsquery_util.c:260 #2 0x0000559debd68643 in QTNBinary (in=in@entry=0x559ded7cd068) at tsquery_util.c:260 #3 0x0000559debd67df5 in tsquery_rewrite (fcinfo=0x559ded72c040) at tsquery_rewrite.c:453 #4 0x0000559debb754f4 in ExecMakeFunctionResultNoSets (fcache=0x559ded72bfd0, econtext=0x559ded72bda8, isNull=0x559ded72d350 "", isDone=) at execQual.c:2046 #5 0x0000559debb7ba1e in ExecTargetList (tupdesc=, isDone=0x7ffce180da6c, itemIsDone=0x559ded72d490, isnull=0x559ded72d350 "", values=0x559ded72d330, econtext=0x559ded72bda8, targetlist=0x559ded72d458) at execQual.c:5486 #6 ExecProject (projInfo=, isDone=isDone@entry=0x7ffce180da6c) at execQual.c:5710 #7 0x0000559debb92c79 in ExecResult (node=node@entry=0x559ded72bc90) at nodeResult.c:155 #8 0x0000559debb74478 in ExecProcNode (node=node@entry=0x559ded72bc90) at execProcnode.c:392 #9 0x0000559debb702fe in ExecutePlan (dest=0x559ded7c8b98, direction=, numberTuples=0, sendTuples=, operation=CMD_SELECT, use_parallel_mode=, planstate=0x559ded72bc90, estate=0x559ded72bb78) at execMain.c:1568 #10 standard_ExecutorRun (queryDesc=0x559ded727a18, direction=, count=0) at execMain.c:338 #11 0x0000559debc9c238 in PortalRunSelect (portal=portal@entry=0x559ded71f958, forward=forward@entry=1 '\001', count=0, count@entry=9223372036854775807, dest=dest@entry=0x559ded7c8b98) at pquery.c:946 #12 0x0000559debc9d89e in PortalRun (portal=portal@entry=0x559ded71f958, count=count@entry=9223372036854775807, isTopLevel=isTopLevel@entry=1 '\001', dest=dest@entry=0x559ded7c8b98, altdest=altdest@entry=0x559ded7c8b98, completionTag=completionTag@entry=0x7ffce180dee0 "") at pquery.c:787 #13 0x0000559debc9af42 in exec_simple_query (query_string=0x559ded795048 "...") at postgres.c:1094 #14 PostgresMain (argc=, argv=argv@entry=0x559ded7390b0, dbname=, username=) at postgres.c:4069 #15 0x0000559deb9ee2f8 in BackendRun (port=0x559ded726ef0) at postmaster.c:4274 #16 BackendStartup (port=0x559ded726ef0) at postmaster.c:3946 #17 ServerLoop () at postmaster.c:1704 #18 0x0000559debc2ebb4 in PostmasterMain (argc=3, argv=0x559ded7004a0) at postmaster.c:1312 #19 0x0000559deb9ef68d in main (argc=3, argv=0x559ded7004a0) at main.c:228 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers