Re: [google/gcc-4_7] fix race in __cxa_guard_acquire

2012-09-19 Thread Diego Novillo
On 2012-09-19 15:59 , Ollie Wild wrote: * libsupc++/guard.cc (__cxa_guard_acquire): Exit the loop earlier if we detect that another thread has had success. Don't compare_exchange from a finished state back to a waiting state. Fix up the last argument of the f

[google/gcc-4_7] fix race in __cxa_guard_acquire

2012-09-19 Thread Ollie Wild
This is a merge of r191125 and r191191 from gcc-4_7-branch. It fixes a race in __cxa_guard_acquire which can cause duplicate initialization of static variables within functions. Okay for google/gcc-4_7? Thanks, Ollie Google ref b/7173106. * libsupc++/guard.cc (__cxa_guard_acquire): Ex