faq
flatforty
contribute
subscribe
configure
search
rdf
main
parent
thread
|
Re: Auto bug detecting
by Adriaan de Groot on Thursday 01/Jun/2006, @02:14
|
| More a "potential bug detector". By analyzing source code, you can figure out whether all the variables are initialized, if pointers are non-NULL, etc. Coverity has advanced tools (like ESC/Java, but for C and C++) for doing the analysis and a fairly nice user interface for examining the results of the analysis. Basically, we got hundreds of reports like "Pointer p may be NULL in code p->foo() in file foo.cpp on line 121." So there's your bug (crash) detector; Dirk did most of the fixing, if I remember correctly. |
|
|
The Fine Print: The following comments
are owned by whomever posted them.
( Reply )
|
Re: Auto bug detecting
by Menge on Thursday 01/Jun/2006, @20:37
|
Shouldn't this be done via debugging tools?
Test suites are of great importance to improve code quality.
|
[
Reply To This | View ]
|
Re: Auto bug detecting
by john on Tuesday 06/Jun/2006, @07:44
|
Simple debugging is inadequate and inefficient. Coverity tools perform what is known as "static analysis" - they actually "reason" on the code and look for ways that small sections of code can be accessed (for example, if using a debugger only, you may never hit the 'magic' combination of tests and system state to try a portion of an if-test or rarely-called subroutine. Static analysis doesn't have that problem, it can walk through almost any possible code scenario without actually running the code. It can be time-consuming and tricky, doing all that backtracking and multi-path analysis.)
It's probably still best to perform static and dynamic analysis as well as conventional debugging - and all of it behind a strong lead-in based on quality development practices like Rational Unified Process, strong Systems Engineering (in the "Blanchard" style, not some ad-hoc method), code reviews, formalized build processes, etc.
If you're thinking "I can do it all with a debugger", you haven't been paying attention to the software engineering profession and developments over the past many years. There are better ways to get better code, and a debugger alone just doesn't qualify as "quality" anymore. Coverity (and no, I'm not an employee, own stock in them, benefit in any way from promoting them, etc) is a very good supporting member of the cast of development characters.
|
[
Reply To This | View ]
|
|
The Fine Print: The previous
comments are owned by whomever posted them.
( Reply )
|
|