Skip to content

NVTX: null destination pointer warning-treated-as-error #2639

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
Apr 21, 2025

Conversation

achirkin
Copy link
Contributor

Some compiler versions think the buf can be empty in the definition of the nvtx push_range, resulting in an error:

raft/core/detail/nvtx.hpp:169:14: error: null destination pointer [-Werror=format-truncation=]
  169 |     std::snprintf(buf.data(), length + 1, format, args...);

This fix gives static guarantees to the compiler that the temporary buf length is positive.

@achirkin achirkin added the bug Something isn't working label Apr 17, 2025
@achirkin achirkin self-assigned this Apr 17, 2025
@achirkin achirkin requested a review from a team as a code owner April 17, 2025 14:14
@github-actions github-actions bot added the cpp label Apr 17, 2025
@achirkin achirkin added the non-breaking Non-breaking change label Apr 17, 2025
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.83%. Comparing base (8f79e34) to head (c7181b4).

Additional details and impacted files
@@              Coverage Diff              @@
##           branch-25.06    #2639   +/-   ##
=============================================
  Coverage         80.83%   80.83%           
=============================================
  Files                19       19           
  Lines               527      527           
=============================================
  Hits                426      426           
  Misses              101      101           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@benfred
Copy link
Member

benfred commented Apr 21, 2025

/merge

@rapids-bot rapids-bot bot merged commit d663bbf into branch-25.06 Apr 21, 2025
82 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cpp non-breaking Non-breaking change
Projects
Development

Successfully merging this pull request may close these issues.

3 participants