[Boost-bugs] [Boost C++ Libraries] #8410: lockfree 1.53.0: queue.cpp: push is broken if tail_.compare_exchange_strong returns false

Subject: [Boost-bugs] [Boost C++ Libraries] #8410: lockfree 1.53.0: queue.cpp: push is broken if tail_.compare_exchange_strong returns false
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-04-06 19:40:39


#8410: lockfree 1.53.0: queue.cpp: push is broken if
tail_.compare_exchange_strong returns false
---------------------------------------+------------------------------------
 Reporter: robert.hranitzky@… | Owner: timblechmann
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: lockfree
  Version: Boost 1.53.0 | Severity: Problem
 Keywords: |
---------------------------------------+------------------------------------
 see line 299, queue.hpp, in lockfree, boost version 1.53.0

 the implementation of compare_exchange_strong on x86 may return false;
 see line 320, boost/atomic/detail/gcc-x86.hpp
 however that isn't checked in push() of queue.hpp;

 proof: add an assert to the code, line 299 in queue.hpp:
 assert (tail_.compare_exchange_strong(tail, new_tail) && "ERROR: broken");
 return true;

 and run a stress test with lots of pthreads pushing and popping data.
 I can provide the test code on demand.

 Follow up: maybe this issue applies also to other parts of the lockfree
 code ?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8410>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC