LCLint Home Page

LCLint Home

Download

Linux
Windows 95/NT
Source

Documentation

User's Guide
       HTML Online
Publications
Samples

Other Sources

Links
Mailing Lists
Bugs



Credits


Bugs

This page documents reported bugs in LCLint 2.4.

Please check this page and make sure you are using the latest release (2.4b) before submitting a bug report. If you discover a bug that is not documented here, please report it to lclint-bug@sds.lcs.mit.edu. Include enough information and relevant files so that the bug may be reproduced.

Confirmed

These bugs have been reproduced, and are known to be problems.

Hex Constants

Hexidecimal constants (e.g., 0xFF) are typed as unsigned, but decimal constants are signed.
Compound member designator in offsetof
LCLint cannot parse complex offsetof expressions, like:
typedef struct { union { int i; } u; } S;
int main() { return (int)offsetof(S, u.i); }
Internal Bug at exprNode.c:816
An internal error is raised for casts in bitfield widths:
typedef unsigned S;
typedef struct {
  unsigned u : ((S)4);
} T;
Internal Bug at cscanner.l:1884
An assertion will fail in certain situations when a syntactic comment is not closed.
Segmentation Violation checking special clauses (?)
The Win32 version produces a segmentation violation for a small test program involving special clauses. (Reproduced, but not investigated further.)

Reported

These bugs have been reported, but have not been reproduced or investigated yet.

Problem with libraries

A user-created library produces:
load file ../lib/pthread.lcd: Library file appears to be corrupted. 
Error:
    general.c:342:No int to read:
(Not reproduced yet.)

Fixed in Version 2.4b

These bugs were fixed in update 2.4b.

Checked macros in #ifdefs, etc.

LCLint will incorrectly interpret #ifdefs and other preprocessor commands that involve checked macros. Since the macro is not expanded by the preprocessor, it does not appear to be defined in the #ifdef.
File format in preprocessor messages
The parentfileformat and showcolumn flags do not effect messages reported in the preprocessing phase.
observer arrays
LCLint does not allow observer to be used with an array:
/*@observer@*/ char name[] = "Joe-Max";
Version 2.4b interprets observer on an array in the same way as a pointer to observer storage --- a warning is reported if any element of the array is modified.
strerror
LCLint won't compile on some UNIX systems because it assumses sys_nerr is defined (note, LCLint checking would have detected this, if I didn't override it!). It should just use strerror from the standard library.

Fixed in Version 2.4a

These bugs were fixed in update 2.4a.

errno.h

osd.c should include errno.h.
-DHAVE_STRERROR
The source package did not include -DHAVE_STRERROR in the compile flags. On some systems, this leads to an error when llerror.c is compiled.
Address operator on fields
LCLint incorrectly marks storage resulting form &() as stack-allocated.
isalnum type
The ansi.h library incorrectly declared isalnum and related functions to take an unsigned int parameter (instead of an int). This results from a problem with alternate types and type modifiers, the declaration
unsigned char /*@alt int@*/
was interpreted as
unsigned int | char
Internal Bug at aliasChecks.c:413
LCLint reports internal errors for certain memory checks involving field assignments.

Typing of bitwise operators

LCLint thinks the type of int | unsigned int is int. It should be unsigned int.
Internal Bug at guardSet.c:50
A assertion fails for code like while (a[0] != 0) a[0+2]=0;.
ifndef not handled correctly
LCLint preprocesses #ifndef like #ifdef!
Internal Bug at clabstract.c:1111
An internal assertion fails when a function declaration has both special clauses and a globals clause.


David Evans
Software Devices and Systems
evs@sds.lcs.mit.edu