Add tests for hasher hash_function() const and key_equal key_eq() const observers in unordered containers
Details
- Reviewers
zoecarver Mordante • Quuxplusone kboyarinov rarutyun ldionne - Group Reviewers
Restricted Project - Commits
- rGbe4adb5c2b77: [libcxx][test] Add tests for hash_function() and key_eq() in unordered…
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
https://reviews.llvm.org/harbormaster/unit/view/2593320/
https://reviews.llvm.org/harbormaster/unit/view/2593321/
/home/libcxx-builder/.buildkite-agent/builds/998e9b442c55-1/llvm-project/libcxx-ci/build/generic-debug-iterators/include/c++/v1/__hash_table:330: _LIBCPP_ASSERT '::std::__libcpp_is_constant_evaluated() || (__get_const_db()->__dereferenceable(this))' failed. Attempted to dereference a non-dereferenceable unordered container iterator /home/libcxx-builder/.buildkite-agent/builds/998e9b442c55-1/llvm-project/libcxx-ci/build/generic-debug-iterators/include/c++/v1/__hash_table:442: _LIBCPP_ASSERT '::std::__libcpp_is_constant_evaluated() || (__get_const_db()->__dereferenceable(this))' failed. Attempted to dereference a non-dereferenceable unordered container const_iterator
What's the deal with these failures? The test code doesn't jump out at me as wrong, so I wonder if you've uncovered a bug. Thoughts?
Could you rebase onto main and re-upload this? I suspect the failures might go away now that we've changed a few things about the debug mode.
I looked into this a bit, and I think we might not be registering debug iterators properly in unordered_set and unordered_map when we insert. I'm not sure why the rest of the test suite would be happy with this, though.
This LGTM, I think the CI failures should not be relevant anymore since so much has changed about the debug mode.
The CI failures are with TSAN but everything fails with TSAN right now, so this looks good.