-
Notifications
You must be signed in to change notification settings - Fork 567
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
gcc -fanalyzer warnings (GCC 11) #4274
Comments
Interesting, these have not been caught by clang-analyzer (scan-build). |
Ah, these warnings seem to be newly detected with GCC 11. It builds fine here with GCC 10. |
Is it only me? My impression is that If there is no way to silence these warnings individually, would it be ok to disable them altogether for the time being? |
@smitsohu I have the same impression. A few days ago I tried to tackle the problem in
Though both calls obviously allocate memory... |
full log
ls.c:273:16: warning: leak of ‘strdup(path)’ [CWE-401] [-Wanalyzer-malloc-leak]
profile.c:239:28: warning: leak of ‘ptr’ [CWE-401] [-Wanalyzer-malloc-leak]
restricted_shell.c:123:42: warning: leak of ‘strdup(ptr)’ [CWE-401] [-Wanalyzer-malloc-leak]
0783f9f
sbox.c:254:24: warning: dereference of possibly-NULL ‘arg’ [CWE-690] [-Wanalyzer-possible-null-dereference]
0783f9f
sbox.c:255:16: warning: dereference of possibly-NULL ‘arg’ [CWE-690] [-Wanalyzer-possible-null-dereference
57c0c21
firemon.c:55:9: warning: call to ‘exit’ from within signal handler [CWE-479] [-Wanalyzer-unsafe-call-within-signal-handler]
../include/common.h:39:28: warning: leak of ‘dname’ [CWE-401] [-Wanalyzer-malloc-leak]
All these warings make it impossible ATM to
make
after./configure
with--enable-analyzer
and--enable-fatal-warnings
.The text was updated successfully, but these errors were encountered: