FWIW I've compiled Lustre 2.1.54 patchless client on CentOS 6.2 with Clang's static analyzer (LLVM 3.0).
I decided to disable the static analyzer check "core.NullDereference" because it detects lots of bugs (521). However, based on a first short glance most of them are dubious because the analyzer seems to get confused by Lustre's LASSERT(). (And including all of these 521 bugs would make the tarball larger than the Jira upload file limit.)
Here's the bug summary:
Bug Type |
Quantity |
All Bugs |
270 |
API |
|
Argument with 'nonnull' attribute passed null |
16 |
Dead code |
|
Idempotent operation |
30 |
Dead store |
|
Dead assignment |
120 |
Dead increment |
6 |
Dead initialization |
20 |
Logic error |
|
Assigned value is garbage or undefined |
12 |
Called function pointer is null (null dereference) |
31 |
Division by zero |
4 |
Function call argument is an uninitialized value |
14 |
Garbage return value |
6 |
Result of operation is garbage or undefined |
8 |
Unix API |
|
Undefined allocation of 0 bytes |
3 |
Check out the annotated source in the attached tarball with a web browser.
This is how the source was compiled:
touch META
sh autogen.sh
scan-build ./configure --disable-server \
--with-linux=/usr/src/kernels/2.6.32-220.2.1.el6.x86_64 \
--with-linux-obj=/lib/modules/2.6.32-220.2.1.el6.x86_64/build/ \
--with-downstream-release=wc1
mkdir ./lustre-2.1.54-scan-build
scan-build -o ./lustre-2.1.54-scan-build/ \
-disable-checker core.NullDereference \
make -j 24
Karsten, thanks for submitting these patches. Sorry I didn't reply to this when it was first posted, as it slipped off my radar. Could you please submit these patches to our Gerrit (code review) git repository? Please see http://wiki.whamcloud.com/display/PUB/Using+Gerrit for details.
This will allow us to review, test, and land the patches to Lustre, and not have them sitting in an attachment here.