[Lustre-discuss] Finding bugs in Lustre with Coccinelle
Karsten Weiss
K.Weiss at science-computing.de
Mon Jan 9 03:33:47 PST 2012
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 Quantity
========================================================
All Bugs 594
Dead code
Idempotent operation 11
Dead store
Dead assignment 76
Dead increment 3
Dead initialization 3
Logic error
Assigned value is garbage or undefined 9
Called function pointer is null (null dereference) 27
Dereference of null pointer 456
Dereference of undefined pointer value 1
Division by zero 3
Function call argument is an uninitialized value 4
Garbage return value 1
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)
To view the result extract the archive and point your web browser at:
lustre-2.1.0-scan-build/2012-01-09-1/index.html
Cheers,
Karsten
^1: Here's what I used:
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.0-scan-build
scan-build -o ./lustre-2.1.0-scan-build/ make -j 24
--
___________________________________________creating IT solutions
Dipl.-Inf. Karsten Weiss science + computing ag
phone: +49 7071 9457 452 Hagellocher Weg 73
teamline: +49 7071 9457 681 72070 Tuebingen
email: k.weiss at science-computing.de www.science-computing.de
--
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Roland Niemeier,
Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Philippe Miltin
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196
More information about the lustre-discuss
mailing list