Error in reset_ctrl ?
Open
- Dominant language
- C++
- Stars
- 18.1k
- Forks
- 3.2k
- Avg merge
- 20h 36m
- Merged PRs (30d)
- 1
Description
https://github.com/abseil/abseil-cpp/blob/43ef2148c0936ebf7cb4be6b19927a9d9d145b8f/absl/container/internal/raw_hash_set.h#L1717
The length of ctrl_ is capacity + width + 1, and your comment says set it all to empty, except the last element, to sentinel.
You are setting it all to empty, except the last element, but instead of setting the last element to sentinel, you are ignoring width.
So:
ctrl_[capacity_] = kSentinel;
==>
ctrl_[capacity_ + Group::kWidth] = kSentinel;
Contributor guide
Assessment
This issue has not been assessed yet.