From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14078 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Sami Farin Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl-1.1.22 -static segfaults in __init_tls Date: Mon, 15 Apr 2019 17:10:00 +0200 Message-ID: <20190415151000.fe2r37xpcqx6omcu@m.mifar.in> References: <20190415105917.3zwos4rdvipm6ypa@m.mifar.in> <20190415130737.GF26605@port70.net> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="96872"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.11.4+1 (667a9b3) (2019-03-13) To: musl@lists.openwall.com Original-X-From: musl-return-14094-gllmg-musl=m.gmane.org@lists.openwall.com Mon Apr 15 17:22:06 2019 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.89) (envelope-from ) id 1hG3Qq-000P1Y-Tj for gllmg-musl@m.gmane.org; Mon, 15 Apr 2019 17:22:05 +0200 Original-Received: (qmail 26416 invoked by uid 550); 15 Apr 2019 15:22:02 -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 11986 invoked from network); 15 Apr 2019 15:10:12 -0000 DKIM-Filter: OpenDKIM Filter v2.11.0 mifar.in AF0855FC0D Mail-Followup-To: Sami Farin , musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <20190415130737.GF26605@port70.net> Xref: news.gmane.org gmane.linux.lib.musl.general:14078 Archived-At: On Mon, Apr 15, 2019 at 15:07:37 +0200, Szabolcs Nagy wrote: > * Sami Farin [2019-04-15 12:59:17 +0200]: > > Fedora 29 Linux, gcc-8.3.1-2.fc29, x86_64 kernel 4.19.33. > > > > $ cat musl_crash.c; musl-gcc musl_crash.c -static; ./a.out > > int main(int argc, char* argv[]) { > > return 0; > > } > > > > Segmentation fault > > this is likely a broken binutils > > if the ldflag > > -Wl,--build-id > > or > > -Wl,-z,noseparate-code > > fixes it then it's > > https://sourceware.org/bugzilla/show_bug.cgi?id=23428 > > report it to fedora as it affects anything static linked. > (even with glibc if all non-executable load sections are > turned off such as the note section for build-id) Thanks. Both of those options you suggested generated a non-segfaulting binary with buggy Fedora binutils. I applied these commits and musl-gcc generates working binaries (without needing to pass those ldflags): 6737a6b34f4823deb7142f27b4074831a37ac1e1 d55c3e36094f06bb1fb02f5eac19fdccf1d91f7e 28a27bdbb9500797e6767f80c8128b09112aeed5 d97f1f87b31901ccdb711ec88a0ab792c31d1f60 But I'll just wait till binutils-2.31.2 is released later this year, Fedora probably doesn't bother cherry-picking... Make check produces now # of expected passes 2257 # of unexpected failures 28 # of expected failures 57 # of untested testcases 6 # of unsupported tests 16 which I hope is better than Fedora 29 2.31.1-25: # of unexpected failures 39 --