From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12850 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: dl_iterate_phdr() behaves differently on musl and glibc Date: Mon, 28 May 2018 18:16:50 -0400 Message-ID: <20180528221650.GJ1392@brightrain.aerifal.cx> References: <20180528200243.GH1392@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1527545699 10754 195.159.176.226 (28 May 2018 22:14:59 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 28 May 2018 22:14:59 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-12866-gllmg-musl=m.gmane.org@lists.openwall.com Tue May 29 00:14:54 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1fNQPm-0002iu-I9 for gllmg-musl@m.gmane.org; Tue, 29 May 2018 00:14:54 +0200 Original-Received: (qmail 29846 invoked by uid 550); 28 May 2018 22:17:03 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 29825 invoked from network); 28 May 2018 22:17:02 -0000 Content-Disposition: inline In-Reply-To: Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:12850 Archived-At: On Mon, May 28, 2018 at 11:39:59PM +0200, Bob B. wrote: > > Is there a reason musl's behavior is problematic here? Even without > > the ambiguity I'd be hesitant to change it since programs may be > > relying on it. > > Looking around I found that it caused confusion with libwhich[0] (a program like `which` for dynamic libraries). > There's an issue opened[1] about it working differently on musl then it does on other systems. > But I wonder if it causes any problems... > > Looking at the code, it looks like Apple systems do the same thing as musl and they treated it individually by skipping the first program on the report (itself)[2] Rather than special-casing knowledge of particular systems I think the code should just be fixed so that it doesn't break if the main program is included. > Might be worth checking what other systems do (BSDs especially I think) before making the decision. > > A clarification on POSIX should also take place. Is that a too bureaucratic process? POSIX is not relevant since this interface is not defined by POSIX. I'm rather surprised Apple has it either since it's pretty ELF-specific... Rich