aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2014-01-27 17:56:40 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2014-01-27 17:56:40 +0000
commitfb1ca954c03cfc4664a4b587029b8845b22a2455 (patch)
tree8e66713e0dddd1d10e775c31a3161cbaa010fc53 /libstdc++-v3
parentb1d1299619601466bc024da9e962fbfbcae1fe22 (diff)
downloadgcc-fb1ca954c03cfc4664a4b587029b8845b22a2455.zip
gcc-fb1ca954c03cfc4664a4b587029b8845b22a2455.tar.gz
gcc-fb1ca954c03cfc4664a4b587029b8845b22a2455.tar.bz2
re PR libstdc++/59215 (tsan: warning in shared_ptr_base.h)
PR libstdc++/59215 * include/bits/shared_ptr_base.h (_Sp_counted_base<_S_atomic>::_M_add_ref_lock()): Use relaxed atomic load. From-SVN: r207147
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog7
-rw-r--r--libstdc++-v3/include/bits/shared_ptr_base.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 18012cb..da70830 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,10 @@
+2014-01-27 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/59215
+ * include/bits/shared_ptr_base.h
+ (_Sp_counted_base<_S_atomic>::_M_add_ref_lock()): Use relaxed atomic
+ load.
+
2014-01-27 Jason Merrill <jason@redhat.com>
Core DR 475
diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h
index 83724e4..1c3a47d 100644
--- a/libstdc++-v3/include/bits/shared_ptr_base.h
+++ b/libstdc++-v3/include/bits/shared_ptr_base.h
@@ -233,7 +233,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_M_add_ref_lock()
{
// Perform lock-free add-if-not-zero operation.
- _Atomic_word __count = _M_use_count;
+ _Atomic_word __count = _M_get_use_count();
do
{
if (__count == 0)