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

Fix the semantics of DenseHashMap to be consistent even when inserting nulls #18129

Merged
merged 2 commits into from
Sep 11, 2023

Conversation

hrydgard
Copy link
Owner

@hrydgard hrydgard commented Sep 11, 2023

We've always had an uncomfortable ambiguity where you could insert nulls, but they'd return null like they weren't there and there was no way to check if a null had actually been inserted before, leading to double-insert asserts if you checked for an existing item before inserting but the previous item was a nullptr.

With this, the semantics are more normal. This allows us to fix one of the crashes from #18116.

@hrydgard hrydgard added the Code Cleanup Cleanup to make future work easier. Needs to be done sometimes. label Sep 11, 2023
@hrydgard hrydgard added this to the v1.16.1 milestone Sep 11, 2023
@hrydgard hrydgard merged commit b83e89a into master Sep 11, 2023
18 checks passed
@hrydgard hrydgard deleted the hashmap-semantics-fix branch September 11, 2023 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Cleanup Cleanup to make future work easier. Needs to be done sometimes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant