]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR libstdc++/59215 (tsan: warning in shared_ptr_base.h)
authorJonathan Wakely <jwakely@redhat.com>
Tue, 11 Mar 2014 19:41:07 +0000 (19:41 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 11 Mar 2014 19:41:07 +0000 (19:41 +0000)
2014-03-11  Jonathan Wakely  <jwakely@redhat.com>

Backport from mainline.
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.

From-SVN: r208495

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/shared_ptr_base.h

index 24b33d1f6f04700dc369edffb8169fabbe54637d..0e95706eda6d4be459a884d21227c15354a54d2b 100644 (file)
@@ -1,3 +1,13 @@
+2014-03-11  Jonathan Wakely  <jwakely@redhat.com>
+
+       Backport from mainline.
+       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-03-11  Jonathan Wakely  <jwakely@redhat.com>
 
        Backport from mainline.
index 9dcefa2ee6ac867e8579aaaf488951c75ff0c22d..e661b6501e91d9b273d8eb7f4aa113f7c2cf3f2e 100644 (file)
@@ -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)