clang static analysis report
Hi,
here's the results of running scan-build on a part of the sources. I interrupted it, this takes quite a while. Anyway, you've got 263 possible bugs to check. Either there are many false positives or. inkscape shouldn't even start :) .
Open index.html: https://db.tt/3Nj4vpmG
Regards,
Markus
On 23-3-2014 21:17, Markus Engel wrote:
Hi,
here's the results of running scan-build on a part of the sources. I interrupted it, this takes quite a while... Anyway, you've got 263 possible bugs to check. Either there are many false positives or... inkscape shouldn't even start :) .
Open index.html: https://db.tt/3Nj4vpmG
Great stuff.
First bug I looked at is not a false positive at all.
- Johan
Hello David, Have a look at the link Markus posted: Open index.html: https://db.tt/3Nj4vpmG
libuemf causes a lot of the potential bugs listed, and they are not all false positives. For example, one pattern pops up a lot:
U_PSEUDO_OBJ *functionname(const U_PSEUDO_OBJ *Clc){ if(Clc && (Clc->Type != blah)) return(NULL); // use of *Clc afterwards, will crash on Clc==NULL
The way you should write the check is: if(!Clc || (Clc->Type != blah)) return NULL;
Have a look at the other errors too. memleaks and all.
Thanks, Johan
On 23-3-2014 21:17, Markus Engel wrote:
Hi,
here's the results of running scan-build on a part of the sources. I interrupted it, this takes quite a while... Anyway, you've got 263 possible bugs to check. Either there are many false positives or... inkscape shouldn't even start :) .
Open index.html: https://db.tt/3Nj4vpmG
Regards,
Markus
"parameter name omitted"...
Seems I don't know C :) .
Anyway, here's a new analyzer run: https://db.tt/OPmKB75h
I applied Davids patch and let it finish (1,5h) this time, so this is all we get.
FIY:
Heres the analyzers faq: http://clang-analyzer.llvm.org/faq.html
This is about source annotations: http://clang-analyzer.llvm.org/annotations.html
Summary: I know the pointer is never null. -> Remove the null pointer check and add an assertion to silence the analyzer.
Regards,
Markus
Von: Markus Engel [mailto:p637777@...1081...] Gesendet: Sonntag, 23. März 2014 21:17 An: 'Johan Engelen'; inkscape-devel@lists.sourceforge.net Betreff: [Inkscape-devel] clang static analysis report
Hi,
heres the results of running scan-build on a part of the sources. I interrupted it, this takes quite a while Anyway, youve got 263 possible bugs to check. Either there are many false positives or inkscape shouldnt even start :) .
Open index.html: https://db.tt/3Nj4vpmG
Regards,
Markus
participants (2)
-
Johan Engelen
-
Markus Engel