From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13056 Path: news.gmane.org!.POSTED!not-for-mail From: Reiner Herrmann Newsgroups: gmane.linux.lib.musl.general Subject: Segmentation fault in static binaries built with recent binutils Date: Wed, 18 Jul 2018 18:39:40 +0200 Message-ID: <20180718163940.gnx6jkia4i5qdjua@reiner-h.de> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5tgdgbw6srfzhhpy" X-Trace: blaine.gmane.org 1531931877 24821 195.159.176.226 (18 Jul 2018 16:37:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 18 Jul 2018 16:37:57 +0000 (UTC) User-Agent: NeoMutt/20170113 (1.7.2) To: musl@lists.openwall.com Original-X-From: musl-return-13072-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jul 18 18:37:52 2018 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 1ffpSa-0006Mq-Lg for gllmg-musl@m.gmane.org; Wed, 18 Jul 2018 18:37:52 +0200 Original-Received: (qmail 13937 invoked by uid 550); 18 Jul 2018 16:39:59 -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 13902 invoked from network); 18 Jul 2018 16:39:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=reiner-h.de; s=mail; t=1531931981; bh=4elU6b70xDAb9sJuw+NlJGsE5v1pbBlRwm6SjiiXKDA=; h=Date:From:To:Subject:From; b=k6090VulpvoqYwyyoo6aqh4F9zlmm7cqH+DKmhyJDNsGWtqL9DPAm1is5gmFz6Db2 ZxrGh9q2HpoiGBBM6dOCxs13bR7OpnB7MrbefBE2fL5EO1DcQlDbC4XyVJW/KaOdfW mNqHnpeKluC11PPaqIe+RKebibGvkh6LJoqnEJbI= Content-Disposition: inline Xref: news.gmane.org gmane.linux.lib.musl.general:13056 Archived-At: --5tgdgbw6srfzhhpy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, Debian recently updated binutils from 2.30 to 2.31. When compiling simple static binaries with musl (1.19 and git) they segfault on startup (dynamic linking still works fine). With the previous binutils version it is running successfully. $ cat test.c=20 int main() { return 0; } $ musl-gcc -ggdb3 -O0 -static test.c $ gdb ./a.out=20 GNU gdb (Debian 8.1-3) 8.1 [...] Reading symbols from ./a.out...done. (gdb) run Starting program: /tmp/test/a.out=20 =20 Program received signal SIGSEGV, Segmentation fault. 0x000000000040159d in static_init_tls () (gdb) bt #0 0x000000000040159d in static_init_tls () #1 0x0000000000000000 in ?? () See also: https://ci.debian.net/packages/m/musl/unstable/amd64/ Is this a bug in musl or should I report it to binutils? Kind regards, Reiner --5tgdgbw6srfzhhpy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE2Pb6feok2Q1urHM7zPBJKNsO6qcFAltPbUYACgkQzPBJKNsO 6qeytg/+OJ6c9Ym1EoMtSW0wNgIznOkHm64caHv1OUyvMwCLoXijFjMqAp0Pv1vH DEhUvn5DwY9s+fWJHxpJGOTmFH0Q3SPhNMbfqTbWR4DB9krIsnPWRSUMI5T7uwNa BL8rv10PbQzEJyn24J6XXyJAO9IGKrBeTIGglySXnQ6JftXu1quPOSCUyKboPMzy 2fC49OAGfAmHvIIsaOT/9PK5q5IdY+4obAhhONwyLh+bJ71YYAH7QJ07sU/3qqed 6roO0KrFbxp6C9AXIDhRrD8rYPOu06Xx22My9tJwyuF++ue/j/9iPFnXTzLTKi2s nr1ZgR8b0PSaZD+2S9HFNEb62XdeARAgdoiD79n8h5ZMwcxZak+Btr92czy/YvGW dZKM6pJ7bnMx+/y2TdeJ263EKvPK/kikKRSTuqvG3kQqhTQ3p4MUaWx06WE/AdJJ 1n8Tt4mMx0a2YXEDfefKbZT8yPVW0rsoNT/3O6jV20Zl2BKZuIvs17tFQPlleHNy rcYXaxWGZRKPJHClzeSesPU9VIl/5qt6b5JnYd6lD/oq1qBYkKrYsByV/iAJuMCu fSv9VQRCOujvClEp4rD9bvf82NeStjwsJFWo9N4oJUm+XA3tY52Xe5rY2sPwGfEf Yi964yjRhoZwrJ6ZQtrCD9wSBCtrlaxZrjHY2iz8RSyCVEtgzww= =zRCW -----END PGP SIGNATURE----- --5tgdgbw6srfzhhpy--