From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74663 invoked by alias); 8 May 2015 12:50:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 74632 invoked by uid 48); 8 May 2015 12:49:57 -0000 From: "tomas.ukkonen at iki dot fi" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/66071] New: Calling condition variable's notify_all() causes SEGFAULT when the binary is statically linked Date: Fri, 08 May 2015 12:50:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: tomas.ukkonen at iki dot fi X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-05/txt/msg00682.txt.bz2 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 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)