https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66071
Bug ID: 66071 Summary: Calling condition variable's notify_all() causes SEGFAULT when the binary is statically linked Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: tomas.ukkonen at iki dot fi Target Milestone: --- Created attachment 35497 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35497&action=edit Example code causing segmentation fault The following code causes segmentation fault on Debian Linux (Sid) WHEN THE BINARY IS STATICALLY LINKED. Code works correctly when the binary is linked dynamically: #include <condition_variable> int main() { std::condition_variable cv; cv.notify_all(); return 0; } Commands: g++ -v -save-temps -std=c++11 -static test.cpp ./a.out Segmentation fault uname -a Linux moria 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt9-3 (2015-04-23) x86_64 GNU/Linux gcc -v gcc version 4.9.2 (Debian 4.9.2-10)