-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[FR] clang static analyzer: src/include/benchmark/benchmark.h:1069:3: Potential memory leak [cplusplus.NewDeleteLeaks]
#1513
Comments
I could not replicate this. Using clang 17 (trunk) and benchmark/main as of today. |
This used to fail with google/benchmark#1513 Maybe it's gone now?
can we add that static analysis to the benchmark CI bots? |
(Err, of course that is with clang-15, maybe it's gone in clang-16, i don't know yet.) |
How did you run? Just |
As you can see in that very log, by running |
It looks like CodeChecker uses scan-build under the hood, right? Let me try with clang-15 or earlier. |
Yup, the warning is still there with clang-16, as expected: Also, is anyone familiar why benchmarks that are linked to shared libraries |
https://github.com/darktable-org/rawspeed/actions/runs/3574871458/jobs/6011864553#step:23:314
benchmark/include/benchmark/benchmark.h
Lines 1272 to 1276 in 2257fa4
triggers clang static analyzer reports:
It would be really good to either completely rewrite that code to avoid the issue in the first place,
or at least silence it as a known false-positive.
The text was updated successfully, but these errors were encountered: