aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorFrançois Dumont <fdumont@gcc.gnu.org>2020-02-29 18:22:55 +0100
committerFrançois Dumont <fdumont@gcc.gnu.org>2020-05-10 23:01:41 +0200
commit0b83c4fabb899fdbb3ae60ed75b7004b7859fae9 (patch)
treecaa0c24850710ec8e67b8088d17a1ab7b147d179 /gcc
parent92ed82367e7ccf5e031e9cb7c653c14a2d64ca89 (diff)
downloadgcc-0b83c4fabb899fdbb3ae60ed75b7004b7859fae9.zip
gcc-0b83c4fabb899fdbb3ae60ed75b7004b7859fae9.tar.gz
gcc-0b83c4fabb899fdbb3ae60ed75b7004b7859fae9.tar.bz2
libstdc++ Enhance thread safety of debug mode iterators
Avoids race condition when checking for an iterator to be singular or to be comparable to another iterator. * src/c++/debug.cc (_Safe_sequence_base::_M_attach_single): Set attached iterator sequence pointer and version. (_Safe_sequence_base::_M_detach_single): Reset detached iterator. (_Safe_iterator_base::_M_attach): Remove attached iterator sequence pointer and version asignments. (_Safe_iterator_base::_M_attach_single): Likewise. (_Safe_iterator_base::_M_detach_single): Remove detached iterator reset. (_Safe_iterator_base::_M_singular): Use atomic load to access parent sequence. (_Safe_iterator_base::_M_can_compare): Likewise. (_Safe_iterator_base::_M_get_mutex): Likewise. (_Safe_local_iterator_base::_M_attach): Remove attached iterator container pointer and version assignments. (_Safe_local_iterator_base::_M_attach_single): Likewise. (_Safe_unordered_container_base::_M_attach_local_single): Set attached iterator container pointer and version. (_Safe_unordered_container_base::_M_detach_local_single): Reset detached iterator.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions