From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11110 Path: news.gmane.org!.POSTED!not-for-mail From: Breno Leitao Newsgroups: gmane.linux.lib.musl.general Subject: musl segfaulting when compiled with -O2 Date: Tue, 7 Mar 2017 17:32:35 -0300 Message-ID: <20170307203234.GC18936@gmail.com> 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 1488918774 17886 195.159.176.226 (7 Mar 2017 20:32:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 7 Mar 2017 20:32:54 +0000 (UTC) User-Agent: Mutt/1.5.23 (2014-03-12) To: musl@lists.openwall.com Original-X-From: musl-return-11125-gllmg-musl=m.gmane.org@lists.openwall.com Tue Mar 07 21:32:50 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 1clLmq-00040T-V7 for gllmg-musl@m.gmane.org; Tue, 07 Mar 2017 21:32:49 +0100 Original-Received: (qmail 15846 invoked by uid 550); 7 Mar 2017 20:32:52 -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 15820 invoked from network); 7 Mar 2017 20:32:51 -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:mime-version :content-disposition:user-agent; bh=HySXMSYrNkD35GBrH3SrMQFpQFAICHXCtAoys7HSKr4=; b=ec1B4cCZQhI3j9qfn8vmGkl8Ml3ITEhDWkXbfeHAPkUoJhI3tOXmSqIa8cl4lKVmZZ TUPzyxPc33NyILepayXbVn4HgyIUw5CfWuRsOvdnxk1MBiQ4L+q/jNPDXkZY96Pa2uWf V31ufQaqRIMGefyQwpVExIvsOtucJYGikrkCMaxHlYFH4w3+3gU58Z5T4NqiyBIGhl8M OsClnPX56xT7xp064KTRbd8wucDuymEbt+U98BVznpkVNcg4aSi4E4lQHhRWsrGMEQg8 K7usCLqW5HrPJAOMUwcq255l/h9R7qk6B6iHTVrbT24wFXpcPRPZcrjYbQ/LRtyiIGme 7ltg== X-Gm-Message-State: AMke39kBQxQ4s6j2YqKtvL6EIUGPxPM8jhgupm7FGWDTkf8ghAh7eZBw1UQUG3iCuhRwsw== X-Received: by 10.200.54.247 with SMTP id b52mr2988416qtc.160.1488918759360; Tue, 07 Mar 2017 12:32:39 -0800 (PST) Content-Disposition: inline Xref: news.gmane.org gmane.linux.lib.musl.general:11110 Archived-At: 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.