From owner-freebsd-ports@FreeBSD.ORG Fri Dec 26 10:15:15 2014 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 219C9152; Fri, 26 Dec 2014 10:15:15 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8840C64D15; Fri, 26 Dec 2014 10:15:14 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id sBQAF4wA064591 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 26 Dec 2014 12:15:04 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua sBQAF4wA064591 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id sBQAF4Z4064572; Fri, 26 Dec 2014 12:15:04 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 26 Dec 2014 12:15:04 +0200 From: Konstantin Belousov To: Thomas Zander Subject: Re: [CFT] New upstream version of mplayer + mencoder Message-ID: <20141226101504.GG1754@kib.kiev.ua> References: <20141225134226.GA78595@marvin2011.fritz.box> <20141225150940.GF1754@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: "freebsd-ports@freebsd.org" , multimedia@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2014 10:15:15 -0000 On Thu, Dec 25, 2014 at 05:26:24PM +0100, Thomas Zander wrote: > On 25 December 2014 at 16:09, Konstantin Belousov wrote: > > On Thu, Dec 25, 2014 at 02:42:26PM +0100, Thomas Zander wrote: > >> - Remove -fomit-frame-pointer from CFLAGS (we have apparently a fair > >> number of CPUs out there which can't run code compiled with this > >> option reliably) > > > > Could you, please, explain this ? > > Unfortunately, I don't know yet why this happens. But I can point you > to the PR where we narrowed the issue down. So far, it seems to affect > various CPUs in 32 bit mode. If you have additional insights, I'd > appreciate it. See here: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=185560 The track in the PR does not contain clean summary, and I have troubles making the conclusion from the vague info there. I very much doubt that the problem is a CPU bug, it would be very high-profile event and would be discovered much earlier then now, esp. for Pentium IV class machines. It seems that everything makes circles around stack alignment and SSE. At least, this is strongly suggested by references to OCFLAGS and the fact that -fomit-frame-pointer implicitely changes stack alignment. SIGBUS is somewhat consistent with this observation. This might be a compiler bug (what compiler ? I cannot find a conclusive answer in the PR), or more likely, it is a bug in inline assembler code, which probably makes unwarranted assumptions about stack alignment. Reporters must show the disassembly of the failed instruction and register dump to confirm or deny my theory. You might want to play with the -mstackrealign compiler option.