From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11112 Path: news.gmane.org!.POSTED!not-for-mail From: Breno Leitao Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl segfaulting when compiled with -O2 Date: Tue, 7 Mar 2017 17:55:29 -0300 Message-ID: <20170307205529.GD18936@gmail.com> References: <20170307203234.GC18936@gmail.com> <20170307203905.GT1520@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 1488920146 30286 195.159.176.226 (7 Mar 2017 20:55:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 7 Mar 2017 20:55:46 +0000 (UTC) User-Agent: Mutt/1.5.23 (2014-03-12) To: musl@lists.openwall.com Original-X-From: musl-return-11127-gllmg-musl=m.gmane.org@lists.openwall.com Tue Mar 07 21:55:42 2017 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 1clM8z-0007PA-Ep for gllmg-musl@m.gmane.org; Tue, 07 Mar 2017 21:55:41 +0100 Original-Received: (qmail 30260 invoked by uid 550); 7 Mar 2017 20:55:46 -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 30241 invoked from network); 7 Mar 2017 20:55:45 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=kHvQVt/ptZTu0C0HJGPhzjUx2J4vd/engU3Qmn0efNk=; b=nwm8O5wQZUJPZYSJd8CJSwSqbz71wAH1A0m8x6bMQTQfUpPiJExqlpkm56aFJAdZu1 Y2xM79X6iJH7zi8P9z8nyrJYDzThS1+mi9rOn8vjOAdqrMp7Wa7ncY2NjEbhDm8CK6Pu kp0mJtFft04o458l6awC48x+zeNSYZtRxrQqjb6hn/aqcUmBbwqDMJADgEp1sEZpah/g mZUaM3cm37zMlUtLdYaKolWLmDiVJEQPErRp20tHb7xykF26VJwRct2KA0oTEpJ4Hy85 BKV+6qergJmKGLDiBNsFn3cGbu5C+EmsgddtAyYkmcdt7OPYKXgDHPqmV2+D1X3OtmG4 OvwA== X-Gm-Message-State: AMke39k8RDz7REyBgh3oDH5ULcc+i38Gz9wCFweowQXq25irLMso+RVCVvncC0lE5jhK6A== X-Received: by 10.237.50.193 with SMTP id z59mr3228776qtd.237.1488920133554; Tue, 07 Mar 2017 12:55:33 -0800 (PST) Content-Disposition: inline In-Reply-To: <20170307203905.GT1520@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:11112 Archived-At: Hi Rich, On Tue, Mar 07, 2017 at 03:39:05PM -0500, Rich Felker wrote: > On Tue, Mar 07, 2017 at 05:32:35PM -0300, Breno Leitao wrote: > > Musl package on Debian on ppc64le is broken. > > > > When running any software with it, it segfaults. Doing a little bit of > > debugging I found that libc.so is broken. > > > > I got the upstream code, and found that the problme is also > > reproducible. > > > > I found that the problem only happen when compiling with -O2 and -O3. If > > I compile musl with -O1 or -O0, the problm does not happen. > > > > This is the bt of the code that crashes: > > > > (gdb) bt > > #0 0x0000000148b84dc0 in ?? () > > #1 0x0000000048bdb8dc in _dlstart_c (sp=0x3fffc33294b0, dynv=) at ldso/dlstart.c:147 > > #2 0x0000000048bdebe0 in _dlstart () > > > > (gdb) up > > #1 0x0000000048bdb8dc in _dlstart_c (sp=0x3fffc33294b0, dynv=) at ldso/dlstart.c:147 > > 147 dls2((void *)base, sp); > > > > $ gcc --version > > gcc (Debian 6.3.0-5) 6.3.0 20170124 > > > > Not sure if this is a GCC issue or a musl issue now. > > Can you post the crashing libc.so somewhere? Depending on how they're > building it, the problem could be in various different places. A > glibc-targeted powerpc* gcc is not suitable for compiling musl, since > it has various ABI mismatches, but that's probably not what you're > seeing here even if one was used. Sure. You can grab it directly from Debian: $ wget http://cdn-fastly.deb.debian.org/debian/pool/main/m/musl/musl_1.1.16-2_ppc64el.deb $ dpkg-deb -x musl_1.1.16-2_ppc64el.deb . $ lib/powerpc64le-linux-musl/libc.so [2] 25672 segmentation fault (core dumped) lib/powerpc64le-linux-musl/libc.so