From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10447 Path: news.gmane.org!.POSTED!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: incompatibility between libtheora/mmx and musl ? Date: Wed, 14 Sep 2016 16:41:45 +0200 Message-ID: <20160914144145.GT1280@port70.net> References: <20160913180649.GN16436@example.net> <20160913204304.GY15995@brightrain.aerifal.cx> <20160914103253.GO16436@example.net> <20160914112400.GS1280@port70.net> <20160914140450.GQ16436@example.net> <20160914142842.GZ15995@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 1473864137 22858 195.159.176.226 (14 Sep 2016 14:42:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 14 Sep 2016 14:42:17 +0000 (UTC) User-Agent: Mutt/1.6.0 (2016-04-01) To: musl@lists.openwall.com Original-X-From: musl-return-10460-gllmg-musl=m.gmane.org@lists.openwall.com Wed Sep 14 16:42:08 2016 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 1bkBNt-0004AV-9Y for gllmg-musl@m.gmane.org; Wed, 14 Sep 2016 16:41:57 +0200 Original-Received: (qmail 26330 invoked by uid 550); 14 Sep 2016 14:41:57 -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 26312 invoked from network); 14 Sep 2016 14:41:57 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <20160914142842.GZ15995@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:10447 Archived-At: * Rich Felker [2016-09-14 10:28:42 -0400]: > On Wed, Sep 14, 2016 at 04:04:50PM +0200, u-uy74@aetey.se wrote: > > On Wed, Sep 14, 2016 at 01:24:00PM +0200, Szabolcs Nagy wrote: > > > there can be some call abi issue (register clobbering, > > > stack alignment,..) because of the asm, but that's hard > > > to check. > > > > Is musl in any way special compared to glibc/uclibc in its register usage? > > Not in principle; this is mandated by the ABI. But it's possible that > their violation of ABI contracts is visible with some implementations > but not others. For example if they're calling malloc from code that's > using asm it's possible that they assume the floating point registers > (or mmx state) are call-saved rather than call-clobbered. This is an > invalid assumption that might happen to actively break on musl but not > glibc. IIRC you need some special instructions to switch between x87 > and (original) mmx usage; perhaps they're missing this somewhere. > this might be an issue: musl uses float instructions in malloc, if mmx needs different fpu state and they don't change it back for a malloc call that can corrupt the heap. to test this, try to use the 'non-float bin index' code in musl from here: http://port70.net/~nsz/musl/malloc.c