[Bug libstdc++/58104] std::call_once appears to fail on standard code

2013-08-08 Thread DBarto at visionpro dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58104

--- Comment #2 from DBarto at visionpro dot com ---
I added the -pthread flag and nothing changed.

The code failed to execute at the point noted in the assembly output.

David

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.


[Bug libstdc++/58104] std::call_once appears to fail on standard code

2013-08-08 Thread DBarto at visionpro dot com
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: 0x
[Switching to process 22829 thread 0x1203]
0x000100074b20 in __once_proxy ()
(gdb) where
#0  0x000100074b20 in __once_proxy ()
#1  0x7fff8f7e0ff0 in pthread_once ()
#2  0x00011165 in __gthread_once (__once=0x155e0,
__func=0x100074b10 <__once_proxy>) at gthr-default.h:718
#3  0x0001142d in call_once >
(__once=@0x155e0, __f=@0x100293e6f) at mutex:822
#4  0x00011247 in do_once () at use_once.cpp:47
#5  0x00012a29 in
_ZNSt12_Bind_simpleIFPFvvEvEE9_M_invokeIIEEEvSt12_Index_tupleIIXspT_EEE
(this=0x100303aa0) at functional:1598
#6  0x00012979 in std::_Bind_simple::operator()
(this=0x100303aa0) at functional:1586
#7  0x00012912 in std::thread::_Impl
>::_M_run (this=0x100303a88) at thread:115
#8  0x0001000754b0 in execute_native_thread_routine ()
#9  0x7fff8f7cc1e1 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.