From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10439 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: incompatibility between libtheora/mmx and musl ? Date: Tue, 13 Sep 2016 16:43:04 -0400 Message-ID: <20160913204304.GY15995@brightrain.aerifal.cx> References: <20160913180649.GN16436@example.net> 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 1473799405 2431 195.159.176.226 (13 Sep 2016 20:43:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 13 Sep 2016 20:43:25 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-10452-gllmg-musl=m.gmane.org@lists.openwall.com Tue Sep 13 22:43:18 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 1bjuY1-0008CY-VI for gllmg-musl@m.gmane.org; Tue, 13 Sep 2016 22:43:18 +0200 Original-Received: (qmail 32155 invoked by uid 550); 13 Sep 2016 20:43:17 -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 32137 invoked from network); 13 Sep 2016 20:43:16 -0000 Content-Disposition: inline In-Reply-To: <20160913180649.GN16436@example.net> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:10439 Archived-At: On Tue, Sep 13, 2016 at 08:06:49PM +0200, u-uy74@aetey.se wrote: > Hello, > > Libtheora contains an assembler part for ia32 and x86_64 which has been > in use for many years, with at least both glibc and uclibc. > > Now, musl-based builds of libtheora for ia32 with this code enabled > lead to the encoder segfaulting. No problem when using the C version. > > This is seen when building at Aetey. Ffmpeg in Alpine exhibits the same > problem, too (strictly speaking, possibly another problem but ffmpeg > crashes there with the same pattern, when encoding to theora). > > People at Xiph do not have any musl-based system and want really detailed > debugging info which implies tracing through musl and following malloc's > internal data (which is what seems to become corrupted). > > In other words, the detailed knowledge (xiph and musl) is located > separately from each other and also from the motivation (aetey, alpine > and possibly others). > > I would appreciate some help and suggestions. The alternative is diving > into mmx-assembler and musl code or resorting to C-only routines which > give roughly half of the performance of the assembler ones. > > More details are there at > > https://trac.xiph.org/ticket/2287 > > There is also a corresponding > > https://bugs.alpinelinux.org/issues/6132 The most likely explanation is that they're overflowing a heap buffer. Perhaps it would be possible to pad all their malloc/realloc calls with +64 or so to see if that makes the problem go away. If so that gives a good starting point for tracking down the bug. Rich