Boost logo

Boost :

Subject: Re: [boost] [multi_index] Missing mutex lock?
From: joaquin_at_[hidden]
Date: 2009-09-22 09:32:36


Anatoly Pinchuk escribió:
>> 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:
>>
>
> Hi Joaquin,
>
> Yes, the race seems to be real since there are list manipulations without
> locking the list first. Even if these manipulations are done in the context of
> exclusive container operation, like delete, it is possible that other thread
> is changing the same list as result of an iterator related operation, like
> iterator destruction.
>

Hi, thanks again for reporting. The problem was indeed a bug and I was
able to expose it through a testing program. Fixed in trunk, soon to be
committed to the release branch:

https://svn.boost.org/trac/boost/changeset/56354

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


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