[Bug libstdc++/89608] Undetected iterator invalidations on unordered containers in debug mode
Jonathan Wakely
jwakely@redhat.com
Thu Mar 7 23:57:00 GMT 2019
On 07/03/19 22:22 +0100, François Dumont wrote:
>Hi
>
>Â Â Â I consider the implementation to decide to invalidate iterators or
>not. As nodes are not deallocated and only slghtly impacted during the
>rehash process I consider that they shouldn't be invalidated appart
>from the local iterators. I should have just consider the Standard.
>
>Â Â Â Here is the complete patch which is Max Sistemich proposal but
>extended to the other unordered containers with also the test adapted
>for the testsuite.
>
>PR libstdc++/89608
>* include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
>Â Invalidate all iterators in case of rehash.
>Â (unordered_multimap<>::_M_check_rehashed): Likewise.
>* include/debug/unordered_set (unordered_set<>::_M_check_rehashed):
>Â Â Likewise.
>Â Â (unordered_multiset<>::_M_check_rehashed): Likewise.
>
>* testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
>
>Â Â Â I run all unordered tests so far in Debug mode. I have 4 unrelated
>failures that I'll fix through another patch. Ok to commit once all
>tests run ?
Yes, this is OK for trunk, thanks!
More information about the Libstdc++
mailing list