Difference between revisions of "Static code analysis"
(Add category) |
(Add info about vzctl changes fixes problems found by Coverity) |
||
Line 21: | Line 21: | ||
=== Coverity === | === Coverity === | ||
− | [https://scan.coverity.com/projects/457 vzquota] was submitted as project to Coverity services. | + | * [https://scan.coverity.com/projects/457 vzquota] was submitted as project to Coverity services. There are no known bugs found by Coverity in vzquota though. |
− | There are no known bugs found by Coverity though. | + | |
+ | * source code of vzctl was submitted to Coverity too. There are amount of issues were found and fixed with their help:[https://stash.openvz.org/projects/OVZL/repos/vzctl/commits/b2f9c254447837b987288bd14b40216943f8fba0 b2f9c254447], | ||
+ | [https://stash.openvz.org/projects/OVZL/repos/vzctl/commits/138b341a23acdfad15667f35ddfa9bbd36603f2c 138b341a23a], | ||
+ | [https://stash.openvz.org/projects/OVZL/repos/vzctl/commits/337f712eac4a47d8e46e4f505a0a9dc9399573ca 337f712eac4], | ||
+ | [https://stash.openvz.org/projects/OVZL/repos/vzctl/commits/dfd699a3a525c60a06669a50d723a7680030ca40 dfd699a3a52], | ||
+ | [https://stash.openvz.org/projects/OVZL/repos/vzctl/commits/767289a2eb03533973e4c186362ee8dee03a8db8 767289a2eb0], | ||
+ | [https://stash.openvz.org/projects/OVZL/repos/vzctl/commits/1b01bb34a9e1effba8f8082ac4d809c30a560216 1b01bb34a9e], | ||
+ | [https://stash.openvz.org/projects/OVZL/repos/vzctl/commits/eebe2c1201aef6c57b7717203db6a85bcc98cdb2 eebe2c1201a], | ||
+ | [https://stash.openvz.org/projects/OVZL/repos/vzctl/commits/09f30856fb4784fe44fb8ae0ce20f8de960f263a 09f30856fb4], | ||
+ | [https://stash.openvz.org/projects/OVZL/repos/vzctl/commits/54cbc8ae07afa6610308a38511ee1940afbc9623 54cbc8ae07a] | ||
+ | and many others. | ||
Revision as of 12:14, 13 April 2015
Static analysis is a technique for finding bugs just by looking at source code without actually running it. That's great, because it can find bugs that are really hard to trigger.
Contents
Tools used to static analysis of OpenVZ components
There are a number of tools which analyze C code and try to detect typical errors. None of these tools is perfect, so using different tools with OpenVZ components will detect more bugs. Be prepared to also get lots of false warnings!
cppcheck
Cppcheck is a static analysis tool for C/C++ code. Unlike C/C++ compilers and many other analysis tools it does not detect syntax errors in the code. Cppcheck primarily detects the types of bugs that the compilers normally do not detect. The goal is to detect only real errors in the code (i.e. have zero false positives).
Some OpenVZ bugs were found using cppcheck: #1309, #1308, #1307, #1306.
Coverity
- vzquota was submitted as project to Coverity services. There are no known bugs found by Coverity in vzquota though.
- source code of vzctl was submitted to Coverity too. There are amount of issues were found and fixed with their help:b2f9c254447,
138b341a23a, 337f712eac4, dfd699a3a52, 767289a2eb0, 1b01bb34a9e, eebe2c1201a, 09f30856fb4, 54cbc8ae07a and many others.