Boost logo

Boost :

Subject: Re: [boost] [multi_index] Missing mutex lock?
From: Joaquin M Lopez Munoz (joaquin_at_[hidden])
Date: 2009-09-17 13:17:28

Joaquin M Lopez Munoz <joaquin <at>> writes:

> Anatoly Pinchuk <appinchuk <at>> writes:
> > 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
> > [...]
> Hi Anatoly,
> Yep, safe_mode::detach_equivalent_iterators is not mutex-protected,
> but this is not an error: this function is called only in the
> context of erase and update operations, where no concurrent access
> to the container is allowed.

Hi again,

Maybe I answered too fast. Considering the following scenario:

Thread A: iterator it1=it2;
Thread B: c.erase(...);

we have a race as iterator assigning meddles with the
internal safe iterator list. I tend to consider the scnario
above as legitimate, so maybe we have an issue here. Thanks
for reporting. Let me study this a little further,
I've created a ticket for it at:

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo

Boost list run by bdawes at, gregod at, cpdaniel at, john at