Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lyauO-0003rh-7k for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Jun 2021 14:09:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lyauN-00007Y-0r for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Jun 2021 14:09:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lyauM-00007I-PW for pgsql-hackers@lists.postgresql.org; Wed, 30 Jun 2021 14:09:42 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lyauI-0003KM-24 for pgsql-hackers@postgresql.org; Wed, 30 Jun 2021 14:09:42 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 15UE9WpZ566227; Wed, 30 Jun 2021 10:09:32 -0400 From: Tom Lane To: Alvaro Herrera cc: Michael Paquier , Jacob Champion , "pgsql-hackers@postgresql.org" , Daniel Gustafsson , info@cspug.cz Subject: Re: Preventing abort() and exit() calls in libpq In-reply-to: <202106301258.xdrqcxocchyg@alvherre.pgsql> References: <202106301258.xdrqcxocchyg@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Wed, 30 Jun 2021 08:58:31 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <566225.1625062172.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 30 Jun 2021 10:09:32 -0400 Message-ID: <566226.1625062172@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > Maybe there's something about the linker flags being used. > ... ah yeah, if I configure with coverage enabled on my machine, it fail= s in the same way. Ah-hah, yeah, I see it too if I enable profiling. I can confirm that it's not from the abort() call in path.c, because it's still there if I remove that. So this is another case where build infrastructure is injecting abort() calls we didn't ask for. Between this and the icc case, I'm now inclined to give up on trying to forbid abort() calls in libpq. I think the value-add for that is a lot lower than it is for exit() anyway. abort() is something one doesn't toss around lightly. You mentioned __gcov_exit, but I'm not sure if we need an exception for that. I see it referenced by the individual .o files, but the completed .so has no such reference, so at least on RHEL8 it's apparently satisfied during .so linkage. Do you see something different? regards, tom lane