Subject: [Boost-bugs] [Boost C++ Libraries] #5194: unique_lock::unlock() does not protect modification of is_locked with mutex
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-02-16 09:40:22
#5194: unique_lock::unlock() does not protect modification of is_locked with mutex
-----------------------------------------------------+----------------------
Reporter: Andrei Kazarov <Andrei.Kazarov@â¦> | Owner:
Type: Bugs | Status: new
Milestone: To Be Determined | Component: None
Version: Boost 1.45.0 | Severity: Problem
Keywords: |
-----------------------------------------------------+----------------------
Shouldn't first is_locked=false and then m->unlock()? Otherwise is_locked
value is undetermined in case of simultaneous calls to lock() and
unlock()...
void unlock()
{
...
m->unlock();
is_locked=false;
}
void lock()
{
...
m->lock();
is_locked=true;
}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5194> 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:05 UTC