Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sat, 22 Aug 2015 20:03:28 +0200
From: Dirk Vanden Boer <>
Subject: Segfault when using c++11 thread


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

file test
test: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically
linked, not stripped

Running test crashes, gdb backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00000000004006ac in __gthread_self () at
#2  0x00000000004007ad in std::this_thread::get_id () at
#3  0x00000000004006bc in main () at main.cpp:6

Am I doing something wrong?


Content of type "text/html" skipped

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.