Repository navigation
Fix: Patch usearch tombstone bug in equal_range iterator - #3899
Merged
Merged
Conversation
The equal_range iterator in flat_hash_multi_set_gt did not check the
deleted flag when advancing, causing it to yield tombstone entries as
live matches. In index_dense_gt::remove() this caused already-freed
slots to be pushed to free_keys_ again, corrupting size() accounting
and leading to crashes ("cannot create std::vector larger than max_size").
Upstream PR: unum-cloud/USearch#727
Contributor
Author
Tracking
Standard development
CI Testing Labels
Documentation checklist
|
|
as51340
approved these changes
Mar 12, 2026
68 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



The
equal_rangeiterator inflat_hash_multi_set_gtdid not check the deleted flag when advancing, causing it to yield tombstone entries as live matches. Inindex_dense_gt::remove()this caused already-freed slots to be pushed tofree_keys_again, corruptingsize()accounting and leading to crashes ("cannot createstd::vectorlarger thanmax_size").Usearch related PR: unum-cloud/USearch#727