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 1lxmVn-0006iX-NA for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Jun 2021 08:20:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lxmVm-0007as-IN for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Jun 2021 08:20:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lxmVm-0007ak-Ad for pgsql-hackers@lists.postgresql.org; Mon, 28 Jun 2021 08:20:58 +0000 Received: from sfr-1.cri.mines-paristech.fr ([77.158.180.225] helo=smtp.cri.ensmp.fr) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lxmVj-0000U9-2f for pgsql-hackers@postgresql.org; Mon, 28 Jun 2021 08:20:57 +0000 Received: from pseudo (nat-7.mines-paristech.fr [77.158.173.14]) by smtp.cri.ensmp.fr (Postfix) with ESMTPSA id 7DC44C01B5; Mon, 28 Jun 2021 10:22:50 +0200 (CEST) Date: Mon, 28 Jun 2021 10:20:52 +0200 (CEST) From: Fabien COELHO X-X-Sender: fabien@pseudo To: Michael Paquier cc: Tom Lane , Jacob Champion , "pgsql-hackers@postgresql.org" , Daniel Gustafsson Subject: Re: Preventing abort() and exit() calls in libpq In-Reply-To: Message-ID: References: <3128896.1624742969@sss.pgh.pa.us> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk >> +# Check for functions that libpq must not call. >> +# (If nm doesn't exist or doesn't work on shlibs, this test will silently >> +# do nothing, which is fine.) >> +.PHONY: check-libpq-refs >> +check-libpq-refs: $(shlib) >> + @! nm -A -g -u $< 2>/dev/null | grep -e abort -e exit > > "abort" and "exit" could be generic terms present in some other > libraries. Could be be better to match with "U abort" and "U exit" > instead? MinGW has a nm command, and it has a compatible option set, > so I think that it should work. A possible trick is to add ccp flags such as: -Dexit=exit_BAD -Dabort=abort_BAD. -- Fabien.