[PATCH] PR libstdc++/91910 fix data race in Debug Mode destructors
François Dumont
frs.dumont@gmail.com
Fri Sep 27 16:07:00 GMT 2019
On 9/26/19 3:20 PM, Jonathan Wakely wrote:
> Fix data race when _Safe_iterator_base::_M_detach() runs concurrently
> with
> the _Safe_container_base destructor.
>
> Â Â Â Â PR libstdc++/91910
> Â Â Â Â * src/c++11/debug.cc (_Safe_iterator_base::_M_detach()): Load pointer
> Â Â Â Â atomically and lock the mutex before accessing the sequence.
> Â Â Â Â (_Safe_iterator_base::_M_reset()): Clear _M_sequence atomically.
>
> Tested x86_64-linux. I plan to commit this to trunk unless somebody
> sees a problem with it.
>
>
Thanks to the additional _M_sequence check in _M_detach_single() this
patch looks good.
François
More information about the Libstdc++
mailing list