From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12585 invoked by alias); 8 Aug 2013 16:20:05 -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 12467 invoked by uid 55); 8 Aug 2013 16:20:01 -0000 From: "DBarto at visionpro dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/58104] std::call_once appears to fail on standard code Date: Thu, 08 Aug 2013 16:20:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: DBarto at visionpro dot com X-Bugzilla-Status: UNCONFIRMED 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: Message-ID: In-Reply-To: References: 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: 2013-08/txt/msg00487.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58104 --- Comment #3 from DBarto at visionpro dot com --- /opt/local/bin/g++-mp-4.7 -std=c++11 -Wall -Wextra -pthread -g use_once.cpp -o use_once ./use_once 571_ ./use_once Segmentation fault: 11 gdb use_once (gdb) r Starting program: /Users/barto/mvp/trunk/unit_test/use_once Reading symbols for shared libraries +++.............................. done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: 13 at address: 0x0000000000000000 [Switching to process 22829 thread 0x1203] 0x0000000100074b20 in __once_proxy () (gdb) where #0 0x0000000100074b20 in __once_proxy () #1 0x00007fff8f7e0ff0 in pthread_once () #2 0x0000000100001165 in __gthread_once (__once=0x1000055e0, __func=0x100074b10 <__once_proxy>) at gthr-default.h:718 #3 0x000000010000142d in call_once > (__once=@0x1000055e0, __f=@0x100293e6f) at mutex:822 #4 0x0000000100001247 in do_once () at use_once.cpp:47 #5 0x0000000100002a29 in _ZNSt12_Bind_simpleIFPFvvEvEE9_M_invokeIIEEEvSt12_Index_tupleIIXspT_EEE (this=0x100303aa0) at functional:1598 #6 0x0000000100002979 in std::_Bind_simple::operator() (this=0x100303aa0) at functional:1586 #7 0x0000000100002912 in std::thread::_Impl >::_M_run (this=0x100303a88) at thread:115 #8 0x00000001000754b0 in execute_native_thread_routine () #9 0x00007fff8f7cc1e1 in thread_start () On Aug 8, 2013, at 9:10 AM, redi at gcc dot gnu.org wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58104 > > --- Comment #1 from Jonathan Wakely --- > Works for me. > > Are you using the -pthread flag? > > You haven't actually said what fails, what fails to execute? > > -- > You are receiving this mail because: > You reported the bug.