Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Rehashing an empty unordered_set with cache_begin set to true hits an assert #75

Closed
seelabs opened this issue Jan 17, 2022 · 1 comment

Comments

@seelabs
Copy link

seelabs commented Jan 17, 2022

Creating a boost::intrusive::make_unordered_set with cache_begin set to true and immediately rehashing will hit an assert. The assert that's hit is here:

BOOST_INTRUSIVE_INVARIANT_ASSERT(insertion_bucket < this->bucket_hash_type::priv_bucket_count());

If cache_begin is set to false, or the collection is not empty, the assert is not hit.

Here is a gist of a small program that will reproduce the issue: https://gist.github.com/seelabs/c91655d1a3516f854b17145faac7db25

@igaztanaga
Copy link
Member

Many thanks for the report and the test case. And sorry for the delay replying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants