Skip to content

Conversation

sbmueller
Copy link
Contributor

Valgrind memcheck supports suppression files. This change allows using our cmake logic to specify a suppression file relative to the repo root.

Tested: https://github.com/swift-nav/starling/pull/9972

@sbmueller sbmueller requested a review from a team as a code owner July 8, 2025 12:06
@sbmueller sbmueller requested a review from Copilot July 8, 2025 12:07
Copy link

sonarqubecloud bot commented Jul 8, 2025

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds support for specifying a Valgrind suppression file via CMake, allowing users to pass a --suppressions flag relative to the repo root when running memcheck.

  • Extend swift_add_valgrind_memcheck to accept a SUPPRESSIONS_FILE argument
  • Append --suppressions=<path> to Valgrind options if provided
Comments suppressed due to low confidence (2)

Valgrind.cmake:297

  • Consider updating any related README or CMake usage docs to mention the new SUPPRESSIONS_FILE option and show an example of how to set it.
  set(argSingle LEAK_CHECK SUPPRESSIONS_FILE)

Valgrind.cmake:325

  • There are no tests covering the new SUPPRESSIONS_FILE behavior; consider adding a CI test or example target that verifies the suppression file is correctly applied.
  if (x_SUPPRESSIONS_FILE)

Copy link

@martin4861 martin4861 left a comment

Choose a reason for hiding this comment

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

lgtm!

@sbmueller sbmueller merged commit 61cdba1 into master Jul 8, 2025
2 checks passed
@sbmueller sbmueller deleted the smuller/AP-3695 branch July 8, 2025 13:48
sbmueller pushed a commit to swift-nav/albatross that referenced this pull request Jul 9, 2025
…grind memcheck [AP-3695] (#185) (#516)

Automated PR by Jenkins. If CI has passed successfully, merge away!



**cmake**  361035b6  ->  61cdba17
- 61cdba17 : Add option for suppression file in valgrind memcheck
[AP-3695] (swift-nav/cmake#185)


This pull request was created by
https://jenkins.ci.swift-nav.com/job/CI%20Infra/job/submodule-update/20444/.


[AP-3695]:
https://swift-nav.atlassian.net/browse/AP-3695?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
sbmueller pushed a commit to swift-nav/libsbp that referenced this pull request Jul 9, 2025
…grind memcheck [AP-3695] (#185) (#1482)

Automated PR by Jenkins. If CI has passed successfully, merge away!



**cmake**  361035b6  ->  61cdba17
- 61cdba17 : Add option for suppression file in valgrind memcheck
[AP-3695] (swift-nav/cmake#185)


This pull request was created by
https://jenkins.ci.swift-nav.com/job/CI%20Infra/job/submodule-update/20444/.


[AP-3695]:
https://swift-nav.atlassian.net/browse/AP-3695?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
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