[PATCH] Add _GLIBCXX_DEBUG checks on unordered container local_iterator
Jonathan Wakely
jwakely@redhat.com
Wed Apr 16 20:19:30 GMT 2025
On Wed, 16 Apr 2025 at 20:57, François Dumont <frs.dumont@gmail.com> wrote:
>
> libstdc++: Add _GLIBCXX_DEBUG checks on unordered container
> local_iterator
>
> Some _GLIBCXX_DEBUG checks in include/debug/safe_local_iterator.h
> were not properly
> tested.
>
> Fix several tests not testing the container corresponding to their
> location in the
> testsuite location.
This mostly looks good, except ...
> libstdc++-v3/ChangeLog:
>
> * testsuite/util/debug/unordered_checks.h
> (invalid_local_iterator_arrow_operator): New test function.
> (invalid_local_iterator_copy_instantiation): New test function.
> (invalid_local_iterator_move_instantiation): New test function.
Should these be called invalid_local_iterator_copy_construction and
invalid_local_iterator_move_construction instead of "instantiation"?
And similarly for the filenames of the corresponding tests.
> (invalid_local_iterator_copy_assignment): New test function.
> (invalid_local_iterator_move_assignment): New test function.
> (invalid_local_iterator_const_conversion): New test function.
> *
> testsuite/23_containers/unordered_map/debug/invalid_local_iterator_arrow_operator_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_map/debug/invalid_local_iterator_const_conversion_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_map/debug/invalid_local_iterator_copy_assignment_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_map/debug/invalid_local_iterator_copy_instantiation_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_map/debug/invalid_local_iterator_move_assignment_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_map/debug/invalid_local_iterator_move_instantiation_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_map/debug/max_load_factor_neg.cc: Test
> unordered_map.
> *
> testsuite/23_containers/unordered_multimap/debug/begin2_neg.cc: Test
> unordered_multimap.
> *
> testsuite/23_containers/unordered_multimap/debug/bucket_size_neg.cc:
> Likewise.
> *
> testsuite/23_containers/unordered_multimap/debug/cbegin_neg.cc: Likewise.
> *
> testsuite/23_containers/unordered_multimap/debug/cend_neg.cc: Likewise.
> *
> testsuite/23_containers/unordered_multimap/debug/end1_neg.cc: Likewise.
> *
> testsuite/23_containers/unordered_multimap/debug/end2_neg.cc: Likewise.
> *
> testsuite/23_containers/unordered_multimap/debug/invalid_local_iterator_arrow_operator_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_multimap/debug/invalid_local_iterator_const_conversion_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_multimap/debug/invalid_local_iterator_copy_assignment_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_multimap/debug/invalid_local_iterator_copy_instantiation_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_multimap/debug/invalid_local_iterator_move_assignment_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_multimap/debug/invalid_local_iterator_move_instantiation_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_multimap/debug/max_load_factor_neg.cc:
> Test unordered_multimap.
> *
> testsuite/23_containers/unordered_multiset/debug/invalid_local_iterator_arrow_operator_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_multiset/debug/invalid_local_iterator_const_conversion_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_multiset/debug/invalid_local_iterator_copy_assignment_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_multiset/debug/invalid_local_iterator_copy_instantiation_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_multiset/debug/invalid_local_iterator_move_assignment_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_multiset/debug/invalid_local_iterator_move_instantiation_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_set/debug/invalid_local_iterator_arrow_operator_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_set/debug/invalid_local_iterator_const_conversion_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_set/debug/invalid_local_iterator_copy_assignment_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_set/debug/invalid_local_iterator_copy_instantiation_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_set/debug/invalid_local_iterator_move_assignment_neg.cc:
> New test case.
> *
> testsuite/23_containers/unordered_set/debug/invalid_local_iterator_move_instantiation_neg.cc:
> New test case.
>
> Tested under Linux x86_64, ok to commit ?
>
> François
More information about the Libstdc++
mailing list