[etc] Reg. lclint: tool to catch programming errors in C
HOME


[Date Prev][Date Next][Date Index]

[etc] Reg. lclint: tool to catch programming errors in C


lclint

Some programming errors can be caught early on in the development cycle,
saving time and effort. You may not have bothered with formal code analysis
before, but now would be a good time to start; bugs in kernel code are
generally harder to track down and can have more serious implications than
their user-space counterparts. Generally speaking, a higher standard of
programming is called for; while a user may be prepared to put up with an
email client that occasionally core dumps, they certainly won't put up with
a kernel that freezes or worse, causes data loss.

lclint is a program that can be used to statically check C code, that is
to check it before it has even been compiled or executed. Like lint, lclint
can be run on unmodified C source code and used to catch classic
programming mistakes. However, lclint can do a whole lot more for you, but
you must give it "clues" by annotating your source code using comments in
the appropriate way.

In short, lclint can give you some of the foresight that an experienced
programmer has at their disposal. While it may not be perfectly suited to
kernel C code (which has some unusual characteristics), it can still be
used to prove fragments of code prior to inclusion in the kernel source.

More information on lclint can be found at the
http://lclint.cs.virginia.edu/