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
This commit is contained in:
Jonathan Wakely 2014-01-27 17:56:40 +00:00 committed by Jonathan Wakely
parent b1d1299619
commit fb1ca954c0
2 changed files with 8 additions and 1 deletions

View File

@ -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

View 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)