Closed mcepl closed 4 years ago
Thanks, I briefly looked through non-NULL dereference results:
vis.c:172:2: warning: double-'free' of 'path_absolute_3' [CWE-415] [-Wanalyzer-double-free]
As mentioned on IRC, either I'm missing something or this is a false positive. It seems to report a "double free" of NULL
?
For easier investigation, I created a minimal reproducer of the issue. The output states that both path_absolute
and copy1
are NULL, but then concludes that there is a double free!?
map.c:189:10: warning: leak of 'map' [CWE-401] [-Wanalyzer-malloc-leak]
I don't really understand this either, a reference to the newly allocated map is stored in mode->bindings
from where it is later freed when the mode is no longer used.
To summarize: unless my analysis is wrong, these seem to be false positives. I don't have time to investigate this further right now, we should check it again once the next GCC release is available.
Yes, these could very well be false positives. I just wanted to make sure you see them and tell me that it is nonsense, than just to hold my tongue.
When running gcc10 with -fanalyzer it has this to say:
Full build log with all details.