This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/70554] New: [6 Regression] _GLIBCXX_ATOMIC_BUILTINS changed value
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 05 Apr 2016 17:52:48 +0000
- Subject: [Bug libstdc++/70554] New: [6 Regression] _GLIBCXX_ATOMIC_BUILTINS changed value
- Auto-submitted: auto-generated
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.