From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4937 Path: news.gmane.org!not-for-mail From: "writeonce@midipix.org" Newsgroups: gmane.linux.lib.musl.general Subject: Re: static musl-based gdb and -fPIC Date: Mon, 21 Apr 2014 07:16:14 -0400 Message-ID: <5354FDFE.5030809@midipix.org> References: <5353FDD0.6090903@midipix.org> <20140420203140.GA26358@brightrain.aerifal.cx> <53543E99.1020407@midipix.org> <20140421073347.GB12324@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1398078994 13579 80.91.229.3 (21 Apr 2014 11:16:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Apr 2014 11:16:34 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4941-gllmg-musl=m.gmane.org@lists.openwall.com Mon Apr 21 13:16:27 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1WcCD5-00070M-Cx for gllmg-musl@plane.gmane.org; Mon, 21 Apr 2014 13:16:27 +0200 Original-Received: (qmail 31913 invoked by uid 550); 21 Apr 2014 11:16:26 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 31904 invoked from network); 21 Apr 2014 11:16:25 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: <20140421073347.GB12324@port70.net> Xref: news.gmane.org gmane.linux.lib.musl.general:4937 Archived-At: On 04/21/2014 03:33 AM, Szabolcs Nagy wrote: > * writeonce@midipix.org [2014-04-20 17:39:37 -0400]: >> For the record: python's Modules/posixmodule.c has a static >> implementation of posix_close that is incompatible with musl's. My > yes they define posix_ prefixed symbols for internal use > which are reserved names for the c implementation when > any standard headers are included > > the next posix standard defines posix_close so this is a > real collision (and will be an issue with every conformant > libc), but all the other posix_ symbols are wrong there too > >> first take on that was to make python use musl's posix_close, which >> resulted in a very subtle bug leading to a segmentation fault (not >> to mention all of those lost hours...) Renaming the module's >> posix_close to __posix_close solved the problem. The code that > these functions have nothing to do with libc: they operate on > python objects > > the symbols should be just renamed but your solution is wrong: > the __ prefix is still in the reserved name space > > use s/posix_/pyposix_/ or similar > > Thanks for pointing this out. I guess Py_posix_close would be closest in spirit to the rest of the python code.