Skip to content

Fix DBSCAN overflow#7421

Merged
rapids-bot[bot] merged 3 commits intorapidsai:mainfrom
divyegala:dbscan-overflow
Nov 3, 2025
Merged

Fix DBSCAN overflow#7421
rapids-bot[bot] merged 3 commits intorapidsai:mainfrom
divyegala:dbscan-overflow

Conversation

@divyegala
Copy link
Copy Markdown
Member

Closes #5393

The problem was that n_rows * n_cols > INT_MAX causes an overflow. This PR switches to int64 indexing in that case.

@divyegala divyegala self-assigned this Oct 31, 2025
@divyegala divyegala requested a review from a team as a code owner October 31, 2025 22:10
@divyegala divyegala requested a review from jcrist October 31, 2025 22:10
@divyegala divyegala added bug Something isn't working non-breaking Non-breaking change labels Oct 31, 2025
@github-actions github-actions Bot added the Cython / Python Cython or Python issue label Oct 31, 2025
Copy link
Copy Markdown
Member

@dantegd dantegd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have one comment, besides that the logic looks good

Comment thread python/cuml/cuml/cluster/dbscan.pyx Outdated
Co-authored-by: Dante Gama Dessavre <dante.gamadessavre@gmail.com>
@divyegala
Copy link
Copy Markdown
Member Author

/merge

@rapids-bot rapids-bot Bot merged commit 44ebe46 into rapidsai:main Nov 3, 2025
190 of 192 checks passed
vardhan30016 pushed a commit to vardhan30016/cuml that referenced this pull request Nov 7, 2025
Closes rapidsai#5393

The problem was that `n_rows * n_cols > INT_MAX` causes an overflow. This PR switches to `int64` indexing in that case.

Authors:
  - Divye Gala (https://github.com/divyegala)

Approvers:
  - Victor Lafargue (https://github.com/viclafargue)
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: rapidsai#7421
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Cython / Python Cython or Python issue non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] DBSCAN crashes on data with a large number of rows

4 participants