🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c.moderated
Article #2162

LCLint 2.0

#2162
From: David Evans
Date: Mon, 04 Mar 1996 04:11
65 lines
3262 bytes
[I am approving this, and heartily endorsing it.  I got it, it built
 without trouble, and it has reassured me that my code is beautiful. -mod]

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 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/
Technical Details
Message-ID: <4hdqgm$8nv@solutions.solon.com>
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
From: David Evans <evs@larch.lcs.mit.edu>
Newsgroups: comp.lang.c.moderated,comp.lang.c
Subject: LCLint 2.0
Date: 3 Mar 1996 22:11:02 -0600
Organization: MIT Lab for Computer Science
Sender: clc@solutions.solon.com
Approved: clc@solutions.solon.com
Message-ID: <4hdqgm$8nv@solutions.solon.com>
NNTP-Posting-Host: solutions.solon.com
X-Mailer: Mozilla 2.0 (X11; I; OSF1 V3.2 alpha)