|
Message-ID: <CADuK5a2948zgtTnzM8xVJN6QgEMqnsshLp9ECw_AKMrzPdtHGg@mail.gmail.com>
Date: Sat, 22 Aug 2015 20:03:28 +0200
From: Dirk Vanden Boer <dirk.vdb@...il.com>
To: musl@...ts.openwall.com
Subject: Segfault when using c++11 thread
Hi,
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
/home/dirk/cross/x86_64-linux-musl/x86_64-linux-musl/include/c++/5.2.0/x86_64-linux-musl/bits/gthr-default.h:686
#2 0x00000000004007ad in std::this_thread::get_id () at
/home/dirk/cross/x86_64-linux-musl/x86_64-linux-musl/include/c++/5.2.0/thread:263
#3 0x00000000004006bc in main () at main.cpp:6
Am I doing something wrong?
Regards,
Dirk
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.