Skip to content
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 read error in compound segmented reduce #12722

Merged
merged 3 commits into from
Feb 9, 2023

Conversation

davidwendt
Copy link
Contributor

Description

Fixes an out-of-bounds memory read in the compound segmented reduction logic. The number of segments was computed incorrectly causing an extra read passed the end of the valid-counts vector. This was found by running compute-sanitizer test on the reductions gtests as follows:

compute-sanitizer --tool memcheck --demangle full gtests/REDUCTIONS_TEST --rmm_mode=cuda

The number of segments is 1 less than the number of offsets.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@davidwendt davidwendt added bug Something isn't working 3 - Ready for Review Ready for review by team libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change labels Feb 7, 2023
@davidwendt davidwendt self-assigned this Feb 7, 2023
@codecov
Copy link

codecov bot commented Feb 7, 2023

Codecov Report

❗ No coverage uploaded for pull request base (branch-23.04@89ec635). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@               Coverage Diff               @@
##             branch-23.04   #12722   +/-   ##
===============================================
  Coverage                ?   85.85%           
===============================================
  Files                   ?      158           
  Lines                   ?    25204           
  Branches                ?        0           
===============================================
  Hits                    ?    21638           
  Misses                  ?     3566           
  Partials                ?        0           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@davidwendt davidwendt marked this pull request as ready for review February 8, 2023 00:45
@davidwendt davidwendt requested a review from a team as a code owner February 8, 2023 00:45
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@davidwendt
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 8d17379 into rapidsai:branch-23.04 Feb 9, 2023
@davidwendt davidwendt deleted the bug-compound-seg-red branch February 9, 2023 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants