English 中文(简体)
缩略语:是外部静态代码分析工具,值得为编码基础作出努力?
原标题:splint vs gcc: are external static code analysis tools worth the effort for C codebases?

I m从事一个相当复杂的项目,并作为另一个复杂因素,它成为一种内线的六氯环己烷模块。 运用诸如在这种法典基础上的pl等lin锁工具当然并非不可能...... *** ,但微乎其微的努力不足以取得一些进展。

Before I invest more time into this, I was hoping to garner some feedback and opinions on the issue. With enough flags, gcc does quite a lot of checking. Is using a separate static code analysis tool still worth it in practice?

[1] http://www.cs.virginia.edu/pipermail/splint-discuss/2005-January/000531.html

最佳回答

虽然splint 无疑是站不住脚的,但我认为,在短链氯化石蜡来源上使用这一系统所需的努力可能比它回头还要大。

然而,油轮开发商有自己的<代码>sparse工具进行一些类似的检查,并已将其使用深入地融入油轮来源。 把它纳入your<>/em> 来源也应当具有很高的自然意义,因为它已经超越了《油轮来源法》。 见Documentation/sparse.txt,详见sparse<>。

有一个商业项目,Coverity,偶尔会发现许多“高重要性”的开放源项目。 他们用自己的工具,在Linotkernel来源发现了数以百计(如果不是数千)的 b。 (这是他们宣传其产品的一个好故事,美国政府正在对极其重要的法典进行大量审查,公开来源作者获得免费假报告,公开来源用户获取免费密码审查的好处。) 四舍五入!

是否值得你购买专家知识是另一个问题——但与<代码>sparse<>/code”相结合将给你带来固定代码检查工具的某些好处,而无需发放许可证。

问题回答

In addition to the tools like sparse, I would suggest taking a look at LDV project. LDV is oriented towards checking Linux drivers in the first place. This system performs deeper static analysis than splint and sparse and can detect very elusive problems.

LDV是免费软件。

如果你想尝试,但却没有时间进行部署,他们拥有在线核查服务,在那里,你可以上载你的代码,并接受检查。

除此之外,。 制度也可能值得考虑。 和LDV一样,Cccinelle被用于探测到许多不同的Rino kernel错误。





相关问题
gcc -fPIC seems to muck with optimization flags

Following along from this question: how-do-i-check-if-gcc-is-performing-tail-recursion-optimization, I noticed that using gcc with -fPIC seems to destroy this optimization. I am creating a shared ...

Generate assembler code from C file in linux

I would like to know how to generate assembler code from a C program using Unix. I tried the gcc: gcc -c file.c I also used firstly cpp and then try as but I m getting errors. I m trying to build an ...

Getting rid of pre-compiled headers

OK, I have old Metrowerks code for Mac and Windows where the previous developer used pre-compiled headers for every project that this code base builds. How does one get rid of Pre-compiled headers, ...

Include a .txt file in a .h in C++?

I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....

How to compile for Mac OS X 10.5

I d like to compile my application for version 10.5 and forward. Ever since I upgraded to Snow Leopard and installed the latest XCode, gcc defaults to 10.6. I ve tried -isysroot /Developer/SDKs/...