-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
Use gcc's static analyzer with make develop
#970
Comments
Imo that's a bit of a crapshoot given that
|
The are other warning flag differences between gcc and clang (e.g. only gcc supports |
Clang does not warn about unknown warning flags thanks to The problem is that GCC's static analyzer is a As for per-compiler warning flags, the question is how to detect them in the Makefile? |
https://github.com/aaaaaa123456789/libplum/blob/develop/Makefile#L10-L15 |
That's not compatible with BSD Make. |
Hmm. Alright, |
As it turns out, at least GCC 12's analyzer is over-eager, for example not understanding that this does not leak the contents of Lines 385 to 387 in d51ab35
I'm not sure we want to enable it in CI, then. At least not yet. |
Plus, building the parser with the static analyzer OOMs on my machine (and I have upwards of 3 GiB of RAM available!), so, uh... |
Passing
-fanalyzer -fanalyzer-verbosity=0
warns about various potential issues (doublefree
, use afterfree
,NULL
dereference, etc), without having to use ASan at runtime. https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Static-Analyzer-Options.htmlThese are the current warnings (although the bison-generated parser.c warnings are unavoidable):
The text was updated successfully, but these errors were encountered: