Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YvvNl-0000Qo-7F for pgsql-bugs@arkaria.postgresql.org; Fri, 22 May 2015 22:25:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YvvNk-00066X-8d for pgsql-bugs@arkaria.postgresql.org; Fri, 22 May 2015 22:25:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YvvNi-00066M-AI for pgsql-bugs@postgresql.org; Fri, 22 May 2015 22:25:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1YvvNe-0001Ox-Cf for pgsql-bugs@postgresql.org; Fri, 22 May 2015 22:25: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 t4MMPNw5014780; Fri, 22 May 2015 18:25:23 -0400 From: Tom Lane To: lr@pcorp.us cc: pgsql-bugs@postgresql.org Subject: Re: BUG #13334: PostGIS 2.2 crash in topology (array_contain_compare) In-reply-to: <20150522181334.24047.38596@wrigleys.postgresql.org> References: <20150522181334.24047.38596@wrigleys.postgresql.org> Comments: In-reply-to lr@pcorp.us message dated "Fri, 22 May 2015 18:13:34 -0000" Date: Fri, 22 May 2015 18:25:23 -0400 Message-ID: <14779.1432333523@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 lr@pcorp.us writes: > Since May 9th our Debian build bot has been crashing on one of our PostGIS > regression tests. > I tried the same exercise on my Mingw-w64 GCC 4.8.3 (with latest PostgreSQL > 9.5 - (dated 5/22) and also have crashing in same spot. > I isoloated the offending query in PostGIS to this: > with inp as ( select 'MULTIPOINT((0 -10),(5 -10))' ::geometry as g) > select St_AsText(g), ST_Equals(totopogeom(g, 'tt', 1)::geometry, g) from > inp; > Which produces a gdb backtrace: > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 4252.0x3cf4] > array_contain_compare (array1=array1@entry=0xdd94200, > array2=array2@entry=0xde69db8, collation=, > matchall=matchall@entry=1 '\001', fn_extra=0xdeac920) at arrayfuncs.c:4116 > 4116 if (isnull2) Hm. Just guessing from the location of the crash, but I'll bet I overlooked the case of an expanded array with no nulls, ie should be - bool isnull2 = nulls2[j]; + bool isnull2 = nulls2 ? nulls2[j] : false; I'll commit that in a few minutes, please confirm whether it fixes this for you. 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