Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iO2SE-0000XB-GE for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Oct 2019 16:28:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iO2SD-0001DT-8A for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Oct 2019 16:28:45 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iO2SC-0001DM-Sr for pgsql-hackers@lists.postgresql.org; Fri, 25 Oct 2019 16:28:45 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iO2SA-00056x-MB for pgsql-hackers@lists.postgresql.org; Fri, 25 Oct 2019 16:28:43 +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 x9PGSctc018715; Fri, 25 Oct 2019 12:28:38 -0400 From: Tom Lane To: Jehan-Guillaume de Rorthais cc: pgsql-hackers@lists.postgresql.org Subject: Re: segmentation fault when cassert enabled In-reply-to: <20191025175929.7e90dbf5@firost> References: <20191025175929.7e90dbf5@firost> Comments: In-reply-to Jehan-Guillaume de Rorthais message dated "Fri, 25 Oct 2019 17:59:29 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18713.1572020918.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 25 Oct 2019 12:28:38 -0400 Message-ID: <18714.1572020918@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Jehan-Guillaume de Rorthais writes: > When investigating for the bug reported in thread "logical replication - > negative bitmapset member not allowed", I found a way to seg fault postg= resql > only when cassert is enabled. > ... > I hadn't time to digg further yet. However, I don't understand why this = crash > is triggered when cassert is enabled. Most likely, it's not so much assertions that provoke the crash as CLOBBER_FREED_MEMORY, ie the actual problem here is use of already-freed memory. regards, tom lane