Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADuK5a2p5jn2=1epnow7O9gNqSh94S6XujNratPss1sPV59H1w@mail.gmail.com>
Date: Sun, 23 Aug 2015 22:35:15 +0200
From: Dirk Vanden Boer <dirk.vdb@...il.com>
To: Dirk Vanden Boer <dirk.vdb@...il.com>, musl@...ts.openwall.com, 
	gregor.richards@...terloo.ca
Subject: Re: Segfault when using c++11 thread

On Sun, Aug 23, 2015 at 8:35 PM, Szabolcs Nagy <nsz@...t70.net> wrote:
>
> * Dirk Vanden Boer <dirk.vdb@...il.com> [2015-08-22 20:03:28 +0200]:
> > I compiled a native x86_64-linux-musl toolchain on my arch linux box using
> > the musl-cross scripts (no modifications).
> >
> > When running code that uses c++11 threading functionality I get segfaults:
> >
> > Minimal reproduction file:
> > #include <thread>
> > #include <iostream>
> >
> > int main()
> > {
> >     std::cout << "Thread id: " << std::this_thread::get_id() << std::endl;
> > }
> >
> > compile with:
> > ./cross/x86_64-linux-musl/bin/x86_64-linux-musl-g++ -pthread -std=c++11
> > -static -g main.cpp -o test
> >
>
> -static is broken if you don't patch gcc properly
> maybe the musl-cross gcc patch is missing the gthr weak ref fix.
>
> (fwiw static linking works for me with the backported
> musl patches from gcc-trunk
> http://port70.net/~nsz/musl/gcc-5.2.0/gcc-5.2.0-combined.diff
> but this link might get broken in the future)
>

Thanks, using that patch everything works fine.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.