Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 18 Jul 2018 13:37:55 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: Segmentation fault in static binaries built with recent
 binutils

On Wed, Jul 18, 2018 at 06:39:40PM +0200, Reiner Herrmann wrote:
> 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 
>   int main() { return 0; }
>   $ musl-gcc -ggdb3 -O0 -static test.c
>   $ gdb ./a.out 
>   GNU gdb (Debian 8.1-3) 8.1
>   [...]
>   Reading symbols from ./a.out...done.
>   (gdb) run
>   Starting program: /tmp/test/a.out 
>   
>   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?

Can you attach a readelf -a of the binary that's crashing?

Rich

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ