LCLint 2.0

evs@larch.lcs.mit.edu (David Evans)
3 Mar 1996 19:47:40 -0500

          From comp.compilers

Related articles
LCLint 2.0 evs@larch.lcs.mit.edu (1996-03-03)
| List of all articles for this month |

From: evs@larch.lcs.mit.edu (David Evans)
Newsgroups: comp.compilers
Date: 3 Mar 1996 19:47:40 -0500
Organization: Compilers Central
Keywords: C, tools, available

LCLint 2.0 in now available from MIT.


LCLint is a tool for statically checking C programs. With minimal
effort, LCLint can be used as a better lint. If additional effort is
invested adding annotations to programs, LCLint can perform stronger
checks than can be done by any standard lint.


Version 2.0 is a major upgrade to the last public release, Version 1.4c.


The most important enhancement is detection of errors relating to
dynamic memory management: uses of deallocated storage, memory leaks,
dangerous data sharing or unexpected aliasing, uses of possibly
undefined storage, dereferencing a possibly null pointer. These errors
are detected using information provided in annotations. This is
described in


          Static Detection of Dynamic Memory Errors. David Evans. To appear
          in SIGPLAN Conference on Programming Language Design and
          Implementation (PLDI '96), Philadelphia, PA, May 1996.
          http://larch-www.lcs.mit.edu:8001/~evs/pldi96-abstract.html


Some other problems detected by LCLint include:


    o Violations of information hiding. A user-defined type can be declared
        as abstract, and a message is reported where code inappropriately
        depends on the representation of the type.


    o Inconsistent modification of caller-visible state. Functions can be
        annotated with information on what caller-visible state may be
        modified by the function, and an error is reported if the
        modifications produced by the function contradict its declaration.


    o Inconsistent use of global variables. Information on what global and
        file scope variables a function may use can be added to function
        declarations, and a message is reported if the implementation of the
        function uses other global variables or does not uses every global
        variable listed in its declaration.


    o Dangerous macro implementations or invocations.


    o Violations of customizable naming conventions.


    o Program behavior that is undefined because it depends on order of
        evaluation, likely infinite loops, incomplete logic, statements with
        no effect, ignored return values, unused declarations, and exceeding
        certain standard limits.


Please visit the LCLint home page at


      http://larch-www.lcs.mit.edu:8001/larch/lclint/index.html


for more information. The LCLint web site includes the user guide in
HTML format, a sample demonstrating the use of LCLint and a form that
can be used to run LCLint remotely.


LCLint 2.0 can be downloaded from


      http://larch-www.lcs.mit.edu:8001/larch/lclint/download.html


or via anonymous ftp from


      ftp://larch.lcs.mit.edu/pub/Larch/lclint/
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.