https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70554
Bug ID: 70554 Summary: [6 Regression] _GLIBCXX_ATOMIC_BUILTINS changed value Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- https://gcc.gnu.org/ml/gcc-patches/2016-03/msg01159.html observes that r232147 changed the value of _GLIBCXX_ATOMIC_BUILTINS in libstdc++, which affects how atomic ref-counting is done. Previously most targets used atomics for ref-counts, but now many targets will use the generic fallback which relies on a mutex. Code compiled with previous releases will still be using atomics, but code compiled with gcc-6 will lock a mutex and then perform a non-atomic increment/decrement, possibly concurrently with other threads that aren't using the mutex. This needs to be fixed for gcc-6.