-
Notifications
You must be signed in to change notification settings - Fork 902
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
Fix memcheck error in groupby-tdigest get_scalar_minmax #9339
Fix memcheck error in groupby-tdigest get_scalar_minmax #9339
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, this.
How slim are the odds of this fix making it back into |
Codecov Report
@@ Coverage Diff @@
## branch-21.12 #9339 +/- ##
================================================
- Coverage 10.79% 10.77% -0.02%
================================================
Files 116 116
Lines 18869 19360 +491
================================================
+ Hits 2036 2087 +51
- Misses 16833 17273 +440
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may have uncovered another bounds check that could get rolled into here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving. I'll open a seperate PR for other issues encountered.
@gpucibot merge |
The groupby tdigest logic in the
get_scalar_minmax
would access incorrect device memory when encountering an empty group. The index value calculated for a column element in an empty group would be off by -1. This was found running a cuda-memcheck (compute-sanitizer) with theAllNulls
gtest. Here the first group is empty resulting an out-of-bounds read atcol.element<T>(-1)
.This PR adds a check for the empty group (
valid_count==0
) to prevent reading the incorrect column row.