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

First-class suppressions support #107

Open
workingjubilee opened this issue Nov 28, 2024 · 1 comment
Open

First-class suppressions support #107

workingjubilee opened this issue Nov 28, 2024 · 1 comment

Comments

@workingjubilee
Copy link

workingjubilee commented Nov 28, 2024

In general, the standard library often has benign "leaks", either because the platform APIs have a detectable leak and we have no control over them, or because we've allocated a few bytes somewhere to track something like thread info or a mutex. And this will change from version to version. We're trying to reduce them, but it's never our priority, the exact number of possible leaks is platform dependent, and we don't test them.

It would be nice if cargo valgrind made it easy to generate suppressions for these and reuse them, because, contra your documentation that people only need this for unsafe code, people do run it on perfectly safe programs.

@jfrimmel
Copy link
Owner

Thank you for this report. You're totally right and the standard library version 1.83 clearly shows, that this is desperately needed. A simple example can be found in even in this repository: cargo +stable-1.83 test fails due to the "leaks".

I'll have to design a way to get rid of such leak messages, as they are clearly non-actionable by the user (and totally fine as well).

jfrimmel added a commit that referenced this issue Nov 30, 2024
Unfortunately, some new versions may change behavior, e.g. clippy may
add lints, which break the build. Therefore it makes sense, to pin
certain error prone CI-jobs to some specific versions. They should be
bumped regularly, though.

Currently, the following jobs are pinned:
1. the `ci/test`-job: as shown in #105, Rust 1.83 has introduced a valid
   "leak", which fails our tests for now. Therefore this job is pinned
   to 1.82, where this issue doesn't occur. A proper fix is necessary in
   the future (#107).
2. `clippy`: the latest [PR broke the clippy job][clippy-job] due to new
   lints being fired. Therefore the CI is pinned to 1.83 with the issues
   fixed.

[clippy-job]: https://github.com/jfrimmel/cargo-valgrind/actions/runs/12095283463/job/33728289241
jfrimmel added a commit that referenced this issue Nov 30, 2024
Unfortunately, some new versions may change behavior, e.g. clippy may
add lints, which break the build. Therefore it makes sense, to pin
certain error prone CI-jobs to some specific versions. They should be
bumped regularly, though.

Currently, the following jobs are pinned:
1. the `ci/test`-job: as shown in #105, Rust 1.83 has introduced a valid
   "leak", which fails our tests for now. Therefore this job is pinned
   to 1.82, where this issue doesn't occur. A proper fix is necessary in
   the future (#107).
2. `clippy`: the latest [PR broke the clippy job][clippy-job] due to new
   lints being fired. Therefore the CI is pinned to 1.83 with the issues
   fixed.

[clippy-job]: https://github.com/jfrimmel/cargo-valgrind/actions/runs/12095283463/job/33728289241
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

No branches or pull requests

2 participants