On Thu, Aug 30, 2012 at 12:29:51PM +0200, Thiago Macieira wrote:
> 2012-08-30 Thiago Macieira
>
> PR libstdc++/54172
> * libsupc++/guard.cc (__cxa_guard_acquire): Don't compare_exchange
> from a finished state back to a waiting state.
This is ok for trunk and 4.7 branch.
T
Hello
The attached patch fixes a race condition in __cxa_guard_acquire, a regression
from 4.6. When the code was refactored to use the new atomic intrinsics, the
fact that __atomic_compare_exchange_n updates the "expected" variable with the
current value was missed.
That causes the loop to pos