NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lib/51139: C++11 std::call_once() broken on NetBSD
>Number: 51139
>Category: lib
>Synopsis: C++11 std::call_once() broken on NetBSD
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun May 15 01:10:00 +0000 2016
>Originator: Kamil Rytarowski
>Release: 7.99.28 and 7.0
>Organization:
>Environment:
NetBSD chieftec 7.99.28 NetBSD 7.99.28 (GENERIC) #0: Wed Apr 27 05:36:02 CEST 2016 root@chieftec:/tmp/netbsd-tmp/sys/arch/amd64/compile/GENERIC amd64
And
NetBSD nb7_amd64 7.0 NetBSD 7.0 (GENERIC.201509250726Z) amd64
>Description:
The LLVM+Clang+LLDB buildbot has caught quickly a bug on NetBSD with std::call_once() in C++11.
http://reviews.llvm.org/D19271
It happened that std::call_once() as defined in C++11 doesn't work in 7.0 neither in HEAD (7.99.28).
>How-To-Repeat:
Build the following example and try to run.
<code>
#include <iostream>
#include <thread>
#include <mutex>
std::once_flag flag;
void simple_do_once()
{
std::call_once(flag, [](){ std::cout << "Simple example: called once\n"; });
}
int main()
{
std::thread st1(simple_do_once);
st1.join();
}
</code>
<build>
g++ -std=c++11 -lpthread test.cpp
</build>
<run>
</run>
>Fix:
not investigated
Home |
Main Index |
Thread Index |
Old Index