Skip to content

Fixed a bug with AndAny, a case of uint16 overflow #474

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

Merged
merged 1 commit into from
May 19, 2025

Conversation

dzairi
Copy link
Contributor

@dzairi dzairi commented May 19, 2025

When AndAny is used with bitmaps that are using runcontainers that contain a range [x,65535], the resetTo arrayContainer panic with 'panic: runtime error: index out of range [length] with length [length]'.

This is because the loop in line 'arraycontainer.go#L969' val is a uint16 and will overflow and will never be > r.last() as r.last() is MaxUint16.

@lemire lemire merged commit fb67118 into RoaringBitmap:master May 19, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants