Boost logo

Boost :

Subject: [boost] [multi_index] Missing mutex lock?
From: Anatoly Pinchuk (appinchuk_at_[hidden])
Date: 2009-09-16 19:50:15


Possible traversal and modifications of a safe container iterators list
inside safe_mode::detach_equivalent_iterators function are not protected
with locking like the following one in safe_iterator_base::detach function.

#if defined(BOOST_HAS_THREADS)

    boost::detail::lightweight_mutex::scoped_lock lock(cont->mutex);

#endif

Unless some kind of synchronization is provided by callers of the safe_mode
API, the list above can be traversed/modified and modified concurrently in
BOOST_HAS_THREADS environment.

It would be great if somebody can confirm or deny that there is the access
synchronization problem.

Regards,

Anatoly


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk