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

<deque>: Add missed masking of _First_used_block_idx in deque::shrink_to_fit to correctly end the loop #4955

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

frederick-vs-ja
Copy link
Contributor

Fixes #4954.

In #4091, _First_used_block_idx was incorrectly unmasked. In some problematic cases, _First_used_block_idx can become larger than _Mask, which could render the loop infinite.

@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner September 13, 2024 10:18
@CaseyCarter CaseyCarter added the bug Something isn't working label Sep 13, 2024
@StephanTLavavej StephanTLavavej self-assigned this Sep 13, 2024
@CaseyCarter CaseyCarter self-requested a review September 14, 2024 00:14
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Ready To Merge
Development

Successfully merging this pull request may close these issues.

Endless loop in deque::shrink_to_fit()
3 participants