------- Comment #13 from l_heldt at poczta dot onet dot pl  2006-10-31 13:12 
-------
(In reply to comment #12)
> About _M_detach_all specifically, it's called only by ~_Safe_sequence_base(),
> thus only when the container itself is destructed. Therefore, I don't think it
> may cause problems in practice.
> 

Unfortunatelly it may. Suppose there are two threads: consumer/producer where
producer is creating container, taking iterator to the container and passing
the container to consumer thread.  Consumer thread is simply deallocating the
container - thus calling _M_detach_all function. At the same time iterator
destructor is called which causes SIGSEGV.

We actually encountered this problem - this is not taken from code review only.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29496

Reply via email to