Skip to content

Clarify and assert doc ID bounds for rangeIntoBitSet - #17082

Merged
romseygeek merged 1 commit into
apache:mainfrom
kkewwei:clarify_assert_dv
Nov 26, 2026
Merged

romseygeek merged 1 commit into
apache:mainfrom
kkewwei:clarify_assert_dv

Conversation

@kkewwei

@kkewwei kkewwei commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Description

In #16897, I found a potential bounds issue in the implementations of DefaultDocValuesRangeSupport.rangeIntoBitSet and DocValuesRangeSupport.sortedNumericRangeIntoBitSet. If toDoc extends beyond the maxDocId, these methods can accessvalues.get(...) out of bounds.

https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/internal/vectorization/DefaultDocValuesRangeSupport.java#L40
https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/internal/vectorization/DocValuesRangeSupport.java#L75

See ##17064 (comment) for details.

Part of #17064 to Strengthen doc_value.

@romseygeek
romseygeek merged commit e2c77b9 into apache:main Nov 26, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants