Re: [Lustre-discuss] Finding bugs in Lustre with Coccinelle

2012-01-12 Thread Oleg Drokin
Helo! On Jan 12, 2012, at 12:22 AM, Andreas Dilger wrote: You can download the full result (annotated source code) here: http://dl.dropbox.com/u/1868416/lustre-2.1.0-scan-build.tar.bz2 (I will delete this file in a couple of days) Karsten, can you please split this tarball into a couple of

Re: [Lustre-discuss] Finding bugs in Lustre with Coccinelle

2012-01-12 Thread Karsten Weiss
On Thu, 12 Jan 2012, Oleg Drokin wrote: Also would be great to run something like this on 2.2 codebase, I guess. I've updated LU-871 with the results of a new Clang SA scan-build run on the Lustre 2.1.54 source code (i.e. today's git HEAD): http://bugs.whamcloud.com/browse/LU-871 (To trim

Re: [Lustre-discuss] Finding bugs in Lustre with Coccinelle

2012-01-11 Thread Andreas Dilger
On 2012-01-09, at 4:33 AM, Karsten Weiss wrote: I've compiled(^1) Lustre 2.1.0 on CentOS 6.2 with Clang's static analyzer (LLVM 3.0). Here's the bug summary to give you an idea of the result: Bug TypeQuantity

Re: [Lustre-discuss] Finding bugs in Lustre with Coccinelle

2012-01-09 Thread Karsten Weiss
On Sun, 8 Jan 2012, Andreas Dilger wrote: I'm all in favor of using static code analysis tools to find bugs like this. I've compiled(^1) Lustre 2.1.0 on CentOS 6.2 with Clang's static analyzer (LLVM 3.0). Here's the bug summary to give you an idea of the result: Bug Type

Re: [Lustre-discuss] Finding bugs in Lustre with Coccinelle

2012-01-09 Thread Isaac Huang
On Sun, Jan 08, 2012 at 09:43:00AM +, Nikitas Angelinas wrote: Hi Isaac, Funny, I was planning to have a look at this, this weekend if time permitted. I was interested in finding out how noticeable the issue of false positives may be in Coccinelle, but that shouldn't be a big problem as

Re: [Lustre-discuss] Finding bugs in Lustre with Coccinelle

2012-01-09 Thread Isaac Huang
On Sun, Jan 08, 2012 at 10:20:36AM -0700, Andreas Dilger wrote: Isaac, I'm all in favor of using static code analysis tools to find bugs like this. The first step, as you have done is to find and fix the bugs (though with proper patches since LASSERT() as a means of error handling is

Re: [Lustre-discuss] Finding bugs in Lustre with Coccinelle

2012-01-08 Thread Nikitas Angelinas
Hi Isaac, Funny, I was planning to have a look at this, this weekend if time permitted. I was interested in finding out how noticeable the issue of false positives may be in Coccinelle, but that shouldn't be a big problem as one will go through the generated patches manually anyway. Its

Re: [Lustre-discuss] Finding bugs in Lustre with Coccinelle

2012-01-08 Thread Andreas Dilger
Isaac, I'm all in favor of using static code analysis tools to find bugs like this. The first step, as you have done is to find and fix the bugs (though with proper patches since LASSERT() as a means of error handling is unacceptable). After this it would be possible to add such a script to

[Lustre-discuss] Finding bugs in Lustre with Coccinelle

2012-01-07 Thread Isaac Huang
Today I decided to try Coccinelle on latest Lustre code found on master at git://git.whamcloud.com/fs/lustre-release.git. I came up with a simple Coccinelle script that tries to detect the case where a new object is allocated and dereferenced without checking it against NULL. Eight such bugs