From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14170 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Hijacking malloc called within musl libc Date: Fri, 31 May 2019 09:34:24 -0400 Message-ID: <20190531133424.GO23599@brightrain.aerifal.cx> References: <20190530222959.GU16415@port70.net> <20190531114317.GV16415@port70.net> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="38721"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-14186-gllmg-musl=m.gmane.org@lists.openwall.com Fri May 31 15:34:40 2019 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.89) (envelope-from ) id 1hWhg8-0009v0-35 for gllmg-musl@m.gmane.org; Fri, 31 May 2019 15:34:40 +0200 Original-Received: (qmail 12129 invoked by uid 550); 31 May 2019 13:34:37 -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 12104 invoked from network); 31 May 2019 13:34:36 -0000 Content-Disposition: inline In-Reply-To: <20190531114317.GV16415@port70.net> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:14170 Archived-At: On Fri, May 31, 2019 at 01:43:17PM +0200, Szabolcs Nagy wrote: > * sva sva [2019-05-31 00:13:27 -0400]: > > I am interposing all malloc/calloc/realloc/free/memalign but still the > > realloc in scandir gets called from musl's libc. Does that make sense? > > no. > > it works for me as expected. > > you need to write down what you did, what you expected and what you got instead. > (how did you verify that the musl internal realloc gets called? > it can be a bug in your interposer, in your static linker, in ...) It's almost certainly a matter of using a pre-1.1.20 version of musl, or having an old config.mak from pre-1.1.20 musl (with -Bsymbolic-functions) rather than re-running configure with the current version. Rich