IVF-PQ tests: fix segfault when accessing empty lists#838
Merged
rapids-bot[bot] merged 2 commits intorapidsai:branch-25.06from Apr 24, 2025
Merged
Conversation
bdice
approved these changes
Apr 23, 2025
Contributor
Author
|
/merge |
rapids-bot Bot
pushed a commit
that referenced
this pull request
May 27, 2025
Check if the `index.lists()[label]` is not an empty shared pointer before accessing its content in tests. This is a follow-up on #838, in which I fixed this problem in one place, but not in two others in the same file. Authors: - Artem M. Chirkin (https://github.com/achirkin) Approvers: - Corey J. Nolet (https://github.com/cjnolet) URL: #933
mythrocks
pushed a commit
to mythrocks/cuvs
that referenced
this pull request
Jun 3, 2025
Check if the `index.lists()[label]` is not an empty shared pointer before accessing its content in tests. This is a follow-up on rapidsai#838, in which I fixed this problem in one place, but not in two others in the same file. Authors: - Artem M. Chirkin (https://github.com/achirkin) Approvers: - Corey J. Nolet (https://github.com/cjnolet) URL: rapidsai#933
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.
Check if the
index.lists()[label]is not an empty shared pointer before accessing its content in tests.If the list size is zero, the list shared pointer can be
.reset()during deserialization/resizing. Hence IVF-Flat and IVF-PQ can sometimes have empty shared pointers in their.lists()members. In case of IVF-PQ, we've had a piece of tests where this wasn't checked before accessing. As a result, we have been observing occasional CI failures with segfaults - when the IVF-PQ index was very unbalanced, i.e. had empty lists.So far, the affected test is the only place I could identify where the access to the list pointer is unprotected (either via explicit check or by the invariant list_size > 0).