Splitt fcnconstraint and improved error messages.
/*@i22*/
/*@-czechfcns*/
-extern constraint constraint_makeReadSafeExprNode ( /*@dependent@*/ /*@oberserver@*/ exprNode p_po, /*@dependent@*/ /*@oberserver@*/ exprNode p_ind);
+extern constraint constraint_makeReadSafeExprNode ( /*@dependent@*/ /*@observer@*/ exprNode p_po, /*@dependent@*/ /*@observer@*/ exprNode p_ind);
-extern /*@only@*/ constraint constraint_makeWriteSafeExprNode (/*@dependent@*/ /*@oberserver@*/ exprNode p_po, /*@dependent@*/ /*@oberserver@*/ exprNode p_ind);
+extern /*@only@*/ constraint constraint_makeWriteSafeExprNode (/*@dependent@*/ /*@observer@*/ exprNode p_po, /*@dependent@*/ /*@observer@*/ exprNode p_ind);
-extern /*@only@*/ constraint constraint_makeReadSafeInt (/*@dependent@*/ /*@oberserver@*/ exprNode p_t1, int p_index);
+extern /*@only@*/ constraint constraint_makeReadSafeInt (/*@dependent@*/ /*@observer@*/ exprNode p_t1, int p_index);
-extern /*@only@*/ constraint constraint_makeEnsureMaxReadAtLeast (/*@dependent@*/ /*@oberserver@*/ exprNode p_t1, /*@dependent@*/ /*@oberserver@*/ exprNode p_t2, fileloc p_sequencePoint);
+extern /*@only@*/ constraint constraint_makeEnsureMaxReadAtLeast (/*@dependent@*/ /*@observer@*/ exprNode p_t1, /*@dependent@*/ /*@observer@*/ exprNode p_t2, fileloc p_sequencePoint);
extern void constraint_overWrite (constraint p_c1, /*@observer@*/ constraint p_c2) /*@modifies p_c1 @*/;
extern /*@only@*/ cstring constraint_print (/*@temp@*/ /*@observer@*/ constraint p_c) /*@*/;
-extern /*@only@*/ constraint constraint_makeWriteSafeInt (/*@dependent@*/ /*@oberserver@*/ exprNode p_po, int p_ind);
+extern /*@only@*/ constraint constraint_makeWriteSafeInt (/*@dependent@*/ /*@observer@*/ exprNode p_po, int p_ind);
extern exprNode exprNode_copyConstraints (/*@returned@*/ exprNode p_dst, exprNode p_src) /*@modifies p_dst @*/;
-extern /*@only@*/ constraint constraint_makeEnsureEqual (/*@dependent@*/ /*@oberserver@*/ exprNode p_e1, /*@dependent@*/ /*@oberserver@*/ exprNode p_e2, fileloc p_sequencePoint);
+extern /*@only@*/ constraint constraint_makeEnsureEqual (/*@dependent@*/ /*@observer@*/ exprNode p_e1, /*@dependent@*/ /*@observer@*/ exprNode p_e2, fileloc p_sequencePoint);
-extern /*@only@*/ constraint constraint_makeMaxSetSideEffectPostIncrement (/*@dependent@*/ /*@oberserver@*/ exprNode p_e, fileloc p_sequencePoint);
+extern /*@only@*/ constraint constraint_makeMaxSetSideEffectPostIncrement (/*@dependent@*/ /*@observer@*/ exprNode p_e, fileloc p_sequencePoint);
extern constraint constraint_preserveOrig (/*@returned@*/ constraint p_c) /*@modifies p_c @*/;
extern /*@only@*/ constraint constraint_doSRefFixBaseParam (/*@returned@*/ /*@only@*/ constraint p_precondition,
exprNodeList p_arglist);
extern /*@only@*/ cstring constraint_printDetailed (constraint p_c);
-extern /*@only@*/ constraint constraint_makeEnsureLessThan (/*@dependent@*/ /*@oberserver@*/ exprNode p_e1, /*@dependent@*/ /*@oberserver@*/ exprNode p_e2, fileloc p_sequencePoint);
-extern /*@only@*/ constraint constraint_makeEnsureLessThanEqual (/*@dependent@*/ /*@oberserver@*/ exprNode p_e1, /*@dependent@*/ /*@observer@*/ exprNode p_e2, fileloc p_sequencePoint);
+extern /*@only@*/ constraint constraint_makeEnsureLessThan (/*@dependent@*/ /*@observer@*/ exprNode p_e1, /*@dependent@*/ /*@observer@*/ exprNode p_e2, fileloc p_sequencePoint);
+extern /*@only@*/ constraint constraint_makeEnsureLessThanEqual (/*@dependent@*/ /*@observer@*/ exprNode p_e1, /*@dependent@*/ /*@observer@*/ exprNode p_e2, fileloc p_sequencePoint);
-extern /*@only@*/ constraint constraint_makeEnsureGreaterThan (/*@dependent@*/ /*@oberserver@*/ exprNode p_e1, /*@dependent@*/ /*@oberserver@*/ exprNode p_e2, fileloc p_sequencePoint);
-extern /*@only@*/ constraint constraint_makeEnsureGreaterThanEqual (/*@dependent@*/ /*@oberserver@*/ exprNode p_e1, /*@dependent@*/ /*@oberserver@*/ exprNode p_e2, fileloc p_sequencePoint);
+extern /*@only@*/ constraint constraint_makeEnsureGreaterThan (/*@dependent@*/ /*@observer@*/ exprNode p_e1, /*@dependent@*/ /*@observer@*/ exprNode p_e2, fileloc p_sequencePoint);
+extern /*@only@*/ constraint constraint_makeEnsureGreaterThanEqual (/*@dependent@*/ /*@observer@*/ exprNode p_e1, /*@dependent@*/ /*@observer@*/ exprNode p_e2, fileloc p_sequencePoint);
/*drl add 11/28/2000 */
extern /*@only@*/ constraint constraint_makeSRefWriteSafeInt (sRef p_s, int p_ind);
extern /*@only@*/ constraint constraint_doFixResult (constraint p_postcondition, /*@dependent@*/ /*@observer@*/ exprNode p_fcnCall);
-extern /*@only@*/ constraint constraint_makeEnsureLteMaxRead(/*@dependent@*/ /*@oberserver@*/ exprNode p_index, /*@dependent@*/ /*@oberserver@*/ exprNode p_buffer);
+extern /*@only@*/ constraint constraint_makeEnsureLteMaxRead(/*@dependent@*/ /*@observer@*/ exprNode p_index, /*@dependent@*/ /*@observer@*/ exprNode p_buffer);
-extern /*@only@*/ constraint constraint_makeMaxSetSideEffectPostDecrement (/*@dependent@*/ /*@oberserver@*/ exprNode p_e, fileloc p_sequencePoint);
+extern /*@only@*/ constraint constraint_makeMaxSetSideEffectPostDecrement (/*@dependent@*/ /*@observer@*/ exprNode p_e, fileloc p_sequencePoint);
extern bool constraint_search (constraint p_c, constraintExpr p_old);
/*@only@*/ cstring constraint_printOr (constraint p_c) /*@*/;
extern void constraint_printErrorPostCondition (constraint p_c, fileloc p_loc) ;
extern constraint constraint_setFcnPre (/*@returned@*/ constraint p_c) ;
-extern constraint constraint_origAddGeneratingExpr (/*@returned@*/ constraint p_c, /*@dependent@*/ /*@oberserver@*/ exprNode p_e) ;
+extern constraint constraint_origAddGeneratingExpr (/*@returned@*/ constraint p_c, /*@dependent@*/ /*@observer@*/ exprNode p_e) ;
extern bool /*@alt void@*/ exprNode_generateConstraints (/*@dependent@*/ exprNode p_e) ;
constraint constraint_togglePostOrig (/*@returned@*/ constraint p_c);
/*@only@*/ fileloc constraintExpr_getFileloc (constraintExpr p_expr);
-/*@only@*/ constraintExpr constraintExpr_makeSRefMaxset ( /*@temp@*/ /*@oberver@*/ sRef p_s);
+/*@only@*/ constraintExpr constraintExpr_makeSRefMaxset ( /*@temp@*/ /*@observer@*/ sRef p_s);
/*@only@*/ constraintExpr constraintExpr_makeSRefMaxRead(/*@temp@*/ /*@observer@*/ sRef p_s);
/*@constant observer char *LCL_PARSE_VERSION;@*/
# define LCL_PARSE_VERSION "LCLint 3.0.0.9"
/*@constant observer char *LCL_COMPILE;@*/
-# define LCL_COMPILE "Compiled using gcc -Wall -g on Linux paisley 2.4.3-12 #1 Fri Jun 8 13:35:30 EDT 2001 i686 unknown by evans"
+# define LCL_COMPILE "Compiled using gcc -DSTDC_HEADERS=1 -g -Wall on Linux fowler 2.4.3-12 #1 Fri Jun 8 13:35:30 EDT 2001 i686 unknown by drl7x"
/*@constant observer char *LCL_PARSE_VERSION;@*/
# define LCL_PARSE_VERSION "LCLint 3.0.0.9"
/*@constant observer char *LCL_COMPILE;@*/
-# define LCL_COMPILE "Compiled using gcc -Wall -g on Linux paisley 2.4.3-12 #1 Fri Jun 8 13:35:30 EDT 2001 i686 unknown by evans"
+# define LCL_COMPILE "Compiled using gcc -DSTDC_HEADERS=1 -g -Wall on Linux fowler 2.4.3-12 #1 Fri Jun 8 13:35:30 EDT 2001 i686 unknown by drl7x"
/*@constant observer char *SYSTEM_LIBDIR;@*/
# define SYSTEM_LIBDIR "/usr/include"
/*@constant observer char *DEFAULT_LARCHPATH;@*/
-# define DEFAULT_LARCHPATH "/usr/local/lclint-2.5m/lib"
+# define DEFAULT_LARCHPATH ".:/af9/drl7x/re3/LCLintDev/lib"
/*@constant observer char *DEFAULT_LCLIMPORTDIR;@*/
-# define DEFAULT_LCLIMPORTDIR "/usr/local/lclint-2.5m/imports"
+# define DEFAULT_LCLIMPORTDIR "/af9/drl7x/re3/LCLintDev/imports"
/*@constant observer char *SYSTEM_LIBDIR;@*/
# define SYSTEM_LIBDIR "/usr/include"
/*@constant observer char *DEFAULT_LARCHPATH;@*/
-# define DEFAULT_LARCHPATH "/usr/local/lclint-2.5m/lib"
+# define DEFAULT_LARCHPATH ".:/af9/drl7x/re3/LCLintDev/lib"
/*@constant observer char *DEFAULT_LCLIMPORTDIR;@*/
-# define DEFAULT_LCLIMPORTDIR "/usr/local/lclint-2.5m/imports"
+# define DEFAULT_LCLIMPORTDIR "/af9/drl7x/re3/LCLintDev/imports"
${LCLINTNEW} -f lclint.lclintrc $(CPPFLAGS) +singleinclude cpphash.c +forcehints -misplacedsharequal +showsourceloc -unrecogcomments -supcounts -fcnuse -exportlocal -constuse -mts file -mts filerw +partial
lint:
- ../bin/lclint -f lclint.lclintrc $(CPPFLAGS) +singleinclude $(ALLSRC) -dump lclint +forcehints -misplacedsharequal +showsourceloc -unrecogcomments -supcounts -fcnuse -exportlocal -constuse
+ ../bin/lclint -f lclint.lclintrc $(CPPFLAGS) +singleinclude $(ALLSRC) -dump lclint +forcehints -misplacedsharequal +showsourceloc -supcounts -fcnuse -exportlocal -constuse
# -mts file
GRAMSRC = cgrammar.c cscanner.c mtscanner.c mtreader.c mtgrammar.c
OVERFLOWCHSRC = \
+ constraintGeneration.c \
constraintTerm.c \
constraintExprData.c \
constraintExpr.c \
constraint.c \
constraintList.c \
constraintResolve.c \
- constraintGeneration.c \
constraintOutput.c \
forjunk.c
bool constraint_hasMaxSet(constraint c)
{
+ if (checkForMaxSet(c) )
+ return TRUE;
+
if (c->orig != NULL)
{
if (checkForMaxSet(c->orig) )
return TRUE;
}
- return (checkForMaxSet(c) );
+ return FALSE;
}
constraint constraint_makeReadSafeExprNode ( exprNode po, exprNode ind)
}
else
{
- voptgenerror (FLG_FUNCTIONCONSTRAINT, string, errorLoc);
+ if (constraint_hasMaxSet (c) )
+ voptgenerror (FLG_ARRAYBOUNDS, string, errorLoc);
+ else
+ voptgenerror (FLG_ARRAYBOUNDSREAD, string, errorLoc);
}
fileloc_free(temp);
errorLoc = NULL;
if (c->orig != constraint_undefined)
{
+ st = cstring_appendChar(st, '\n');
genExpr = exprNode_unparse(c->orig->generatingExpr);
if (!c->post)
{
st = cstring_concatFree(st, (message(" derived from %s precondition: %q", genExpr, constraint_printDeep(c->orig) )
) );
else
- st = cstring_concatFree(st,(message(" needed to satisfy %q",
+ st = cstring_concatFree(st,(message(" needed to satisfy precondition:\n%q",
constraint_printDeep(c->orig) )
) );
cstring constraint_printDetailed (constraint c)
{
cstring st = cstring_undefined;
- cstring genExpr;
+ cstring temp = cstring_undefined;
+ cstring genExpr;
if (!c->post)
{
- st = message ("Unresolved constraint:\nLclint is unable to resolve %q", constraint_printDeep (c) );
+ st = message ("Unable to resolve constraint:\n%q", constraint_printDeep (c) );
}
else
{
st = message ("Block Post condition:\nThis function block has the post condition %q", constraint_printDeep (c) );
}
+ if (constraint_hasMaxSet(c) )
+ {
+ temp = cstring_makeLiteral("Possible out-of-bounds store. ");
+ }
+ else
+ {
+ temp = cstring_makeLiteral("Possible out-of-bounds read. ");
+ }
+
+ st = cstring_concatFree(temp,st);
+
genExpr = exprNode_unparse (c->generatingExpr);
if (context_getFlag (FLG_CONSTRAINTLOCATION) )
{
- cstring temp;
- // llassert (c->generatingExpr);
- temp = message ("\nOriginal Generating expression %q: %s\n", fileloc_unparse( exprNode_getfileloc (c->generatingExpr) ),
- genExpr );
+ temp = message ("\nConstraint generated from expression: %s at %q\n",
+ genExpr,
+ fileloc_unparse( exprNode_getfileloc (c->generatingExpr) )
+ );
st = cstring_concatFree (st, temp);
-
- if (constraint_hasMaxSet(c) )
- {
- temp = message ("Has MaxSet\n");
- st = cstring_concatFree (st, temp);
- }
}
return st;
}
llassert (c !=NULL);
if (c->post)
{
- type = cstring_makeLiteral ("Ensures: ");
+ type = cstring_makeLiteral ("ensures: ");
}
else
{
- type = cstring_makeLiteral ("Requires: ");
+ type = cstring_makeLiteral ("requires: ");
}
st = message ("%q: %q %q %q",
type,
switch (op)
{
case MAXSET:
- return message("MAXSET");
+ return message("maxSet");
case MINSET:
- return message("MINSET");
+ return message("minSet");
case MAXREAD:
- return message("MAXREAD");
+ return message("maxRead");
case MINREAD:
- return message("MINREAD");
+ return message("minRead");
default:
llassert(FALSE);
return message ("<(Unary OP OTHER>");
t = constraintExpr_unparse(expr);
- if (cstring_containsLit(t, "MAXSET") != NULL )
+ if (cstring_containsLit(t, "maxSet") != NULL )
{
cstring_free(t);
return (TRUE);
*/
//}
-static bool exprNode_isUnhandled (/*@dependent@*/ /*@obsever@*/ exprNode e)
+static bool exprNode_isUnhandled (/*@dependent@*/ /*@observer@*/ exprNode e)
{
llassert( exprNode_isDefined(e) );
switch (e->kind)
}
-static void exprNode_stmt ( /*@dependent@*/ exprNode e)
+static void exprNode_stmt ( /*@dependent@*/ /*@temp@*/ exprNode e)
{
exprNode snode;
fileloc loc;
}
-static void exprNode_doGenerateConstraintSwitch ( exprNode switchExpr,
- exprNode body, constraintList * currentRequires, constraintList *
- currentEnsures, constraintList * savedRequires, constraintList *
+static /*@dependent@*/ exprNode exprNode_makeDependent(/*@returned@*/ exprNode e)
+{
+ /*@-temptrans@*/
+ return e;
+ /*@=temptrans@*/
+}
+
+static void exprNode_doGenerateConstraintSwitch (/*@dependent@*/ exprNode switchExpr,
+ /*@dependent@*/ exprNode body, /*@special@*/ constraintList * currentRequires, /*@special@*/ constraintList *
+ currentEnsures, /*@special@*/ constraintList * savedRequires, /*@special@*/ constraintList *
savedEnsures)
+ /*@post:only *currentRequires, *currentEnsures, *savedRequires, *savedEnsures @*/ /*@defines *currentRequires, *currentEnsures, *savedRequires, *savedEnsures @*/
{
exprNode stmt, stmtList;
if (exprNode_isError(body) )
{
+ *currentRequires = constraintList_makeNew();
+ *currentEnsures = constraintList_makeNew();
+
+ *savedRequires = constraintList_makeNew();
+ *savedEnsures = constraintList_makeNew();
+ /*@-onlytrans@*/
return;
+ /*@=onlytrans@*/
}
if (body->kind != XPR_STMTLIST )
// llassert(body->kind == XPR_STMT );
stmt = body;
stmtList = exprNode_undefined;
+ stmt = exprNode_makeDependent(stmt);
+ stmtList = exprNode_makeDependent(stmtList);
+ }
+ else
+ {
+ stmt = exprData_getPairB(body->edata);
+ stmtList = exprData_getPairA(body->edata);
+ stmt = exprNode_makeDependent(stmt);
+ stmtList = exprNode_makeDependent(stmtList);
}
- else
- {
- stmt = exprData_getPairB(body->edata);
- stmtList = exprData_getPairA(body->edata);
- }
DPRINTF((message("exprNode_doGenerateConstraintSwitch: stmtlist: %s
stmt: %s",
savedRequires, savedEnsures );
if (exprNode_isError(stmt) )
+ /*@-onlytrans@*/
return;
+ /*@=onlytrans@*/
exprNode_stmt(stmt);
+
+ switchExpr = exprNode_makeDependent (switchExpr);
+
//, FALSE, FALSE, exprNode_getfileloc(stmt) );
if (! exprNode_isCaseMarker(stmt) )
temp = constraintList_reflectChanges (stmt->requiresConstraints,
*currentEnsures);
- *currentRequires = constraintList_mergeRequiresFreeFirst
- (*currentRequires,
- temp);
+ *currentRequires = constraintList_mergeRequiresFreeFirst(
+ *currentRequires,
+ temp);
constraintList_free(temp);
exprNode_unparse(switchExpr), exprNode_unparse(body),
constraintList_print(*currentRequires), constraintList_print(*currentEnsures)
) ));
+ /*@-onlytrans@*/
return;
+ /*@=onlytrans@*/
+
}
if (exprNode_isCaseMarker(stmt) && exprNode_mustEscape(stmtList) )
if (constraintList_isUndefined(*savedEnsures) &&
constraintList_isUndefined(*savedRequires) )
{
+ llassert(constraintList_isUndefined(*savedEnsures) );
+ llassert(constraintList_isUndefined(*savedRequires) );
*savedEnsures = constraintList_copy(*currentEnsures);
*savedRequires = constraintList_copy(*currentRequires);
}
- else
- {
- DPRINTF (( message("Doing logical or") ));
- temp = constraintList_logicalOr (*savedEnsures, *currentEnsures);
- constraintList_free (*savedEnsures);
- *savedEnsures = temp;
-
- *savedRequires = constraintList_mergeRequiresFreeFirst (*savedRequires, *currentRequires);
- }
-
+ else
+ {
+ DPRINTF (( message("Doing logical or") ));
+ temp = constraintList_logicalOr (*savedEnsures, *currentEnsures);
+ constraintList_free (*savedEnsures);
+ *savedEnsures = temp;
+
+ *savedRequires = constraintList_mergeRequiresFreeFirst (*savedRequires, *currentRequires);
+ }
+
con = constraint_makeEnsureEqual (switchExpr, exprData_getSingle
(stmt->edata), exprNode_getfileloc(stmt) );
if (exprNode_isError(stmtList) )
{
constraintList_free(*currentEnsures);
- *currentEnsures = constraintList_copy(ensuresTemp);
- }
- else
- {
- temp = constraintList_logicalOr (*currentEnsures, ensuresTemp);
+ *currentEnsures = constraintList_copy(ensuresTemp);
+ constraintList_free(ensuresTemp);
- constraintList_free(*currentEnsures);
- constraintList_free(ensuresTemp);
+ }
+ else
+ {
+
+ temp = constraintList_logicalOr (*currentEnsures, ensuresTemp);
+
+ constraintList_free(*currentEnsures);
+ constraintList_free(ensuresTemp);
- *currentEnsures = temp;
- }
+ *currentEnsures = temp;
+ }
constraintList_free(*currentRequires);
-
+
*currentRequires = constraintList_makeNew();
}
+ else
+ {
+ // we handle the case of ! exprNode_isCaseMarker above
+ // the else if clause should always be true.
+ BADEXIT;
+ }
DPRINTF(( message("returning from exprNode_doGenerateConstraintSwitch: (switch %s) %s currentRequires:"
"%s currentEnsures:%s",
exprNode_unparse(switchExpr), exprNode_unparse(body),
constraintList_print(*currentRequires), constraintList_print(*currentEnsures)
) ));
+ /*@-onlytrans@*/
return;
+ /*@=onlytrans@*/
}
if ( body->kind == XPR_BLOCK)
body = exprData_getSingle(body->edata);
+ /*
constraintsRequires = constraintList_undefined;
constraintsEnsures = constraintList_undefined;
lastRequires = constraintList_makeNew();
lastEnsures = constraintList_makeNew();
-
+ */
exprNode_doGenerateConstraintSwitch (switchExpr, body, &lastRequires, &lastEnsures, &constraintsRequires, &constraintsEnsures);
constraintList_free (constraintsRequires);
constraintList_free (constraintsEnsures);
}
- else
- {
- switchStmt->ensuresConstraints = constraintList_copy(lastEnsures);
- switchStmt->requiresConstraints = constraintList_copy(lastRequires);
- }
+ else
+ {
+ switchStmt->ensuresConstraints = constraintList_copy(lastEnsures);
+ switchStmt->requiresConstraints = constraintList_copy(lastRequires);
+ }
constraintList_free (lastRequires);
constraintList_free (lastEnsures);
# define end_constraintList_elements_private }}}
-constraintList constraintList_makeNew ()
+/*@only@*/ constraintList constraintList_makeNew ()
{
constraintList s = (constraintList) dmalloc (sizeof (*s));
}
constraintList
-constraintList_copy (/*@oberserver@*/ /*@temp@*/ constraintList s)
+constraintList_copy (/*@observer@*/ /*@temp@*/ constraintList s)
{
constraintList ret = constraintList_makeNew ();
return c;
}
-constraintList constraintList_preserveCallInfo (/*@returned@*/ constraintList c,/*@observer@*/ /*@depenent@*/ /*@observer@*/ exprNode fcn)
+constraintList constraintList_preserveCallInfo (/*@returned@*/ constraintList c,/*@observer@*/ /*@dependent@*/ /*@observer@*/ exprNode fcn)
{
DPRINTF((message("constraintList_preserveOrig preserving the originial constraints for %s ", constraintList_print (c) ) ));
return (t->value.sref);
}
-/*@only@*/ constraintTerm constraintTerm_makeExprNode (/*@depenedent@*/ exprNode e)
+/*@only@*/ constraintTerm constraintTerm_makeExprNode (/*@dependent@*/ exprNode e)
{
constraintTerm ret = new_constraintTermExpr();
ret->loc = fileloc_copy(exprNode_getfileloc(e));
// check if errors will printed
if (! (context_getFlag(FLG_DEBUGFUNCTIONCONSTRAINT) ||
context_getFlag(FLG_FUNCTIONCONSTRAINT) ||
+ context_getFlag(FLG_ARRAYBOUNDS) ||
+ context_getFlag(FLG_ARRAYBOUNDSREAD) ||
context_getFlag(FLG_CHECKPOST)
)
)
"This flag is for debuging. It causes lclint to perform buffer overflow checking even if the error will be surpressed. Normal buffer overflow checking will only be performed if errors would be printed. ",
0, 0
},
+
+ {
+ FK_NT, FK_MEMORY, modeFlag,
+ "arrayBounds",
+ FLG_ARRAYBOUNDS,
+ "Possible out-of-bounds store. Unable to resolve constraint:",
+ "LCLint was unable to resolve a constraint at the top of the function. If code is correct consider using explict annotation assertions, ",
+ 0, 0
+ },
+ {
+ FK_NT, FK_MEMORY, modeFlag,
+ "arrayBoundsRead",
+ FLG_ARRAYBOUNDSREAD,
+ "Possible out-of-bounds read. Unable to resolve constraint:",
+ "LCLint was unable to resolve a constraint at the top of the function. If code is correct consider using explict annotation assertions, ",
+ 0, 0
+ },
+
{
FK_NT, FK_MEMORY, modeFlag,
"fcnconstraint",
static void interrupt (int p_i);
static void loadrc (/*@open@*/ FILE *p_rcfile, cstringSList *p_passThroughArgs)
- /*@ensures closed p_rcfile@*/ ;
+ ; // /*@ensures closed p_rcfile@*/ ;
static void describeVars (void);
static bool specialFlagsHelp (char *p_next);
void
loadrc (/*@open@*/ FILE *rcfile, cstringSList *passThroughArgs)
- /*@ensures closed rcfile@*/
+ // /*@ensures closed rcfile@*/
{
char *s = mstring_create (MAX_LINE_LENGTH);
char *os = s;
$(LCLINTR) mongoincludes.c -includenest 5 -expect 0
mystrncat:
- $(LCLINTR) mystrncat.c +fcnconstraint -expect 4
+ $(LCLINTR) mystrncat.c +arrayBounds +arrayBoundsRead -expect 4
noeffect:
${LCLINT} noeffect.c +allmacros +checks -expect 3
sizeoftest:
@cd sizeoftest; \
- $(LCLINTR) +functionconstraint sizeof.c
+ $(LCLINTR) +arrayBounds +arrayBoundsRead sizeof.c
bufferTest:
@cd bufferTest; \
- $(LCLINTR) +functionconstraint test4.c test6.c
+ $(LCLINTR) +arrayBounds +arrayBoundsRead test4.c test6.c
simplebufferConstraintTests:
@cd simplebufferConstraintTests; \
- $(LCLINTR) +functionconstraint m.c sizeof.c test3.c test7.c
+ $(LCLINTR) +arrayBounds +arrayBoundsRead m.c sizeof.c test3.c test7.c
moreBufferTests:
@cd moreBufferTests; \
- $(LCLINTR) +functionconstraint +orconstraint unrecogCall.c strrchr.c initialization.c simplifyTest.c strncatNotReallyGood.c strncatReallyGood.c
+ $(LCLINTR) +arrayBounds +arrayBoundsRead +orconstraint unrecogCall.c strrchr.c initialization.c simplifyTest.c strncatNotReallyGood.c strncatReallyGood.c
maxset:
@cd maxset; \
globalbufferannotation:
@cd globalbufferannotation; \
- $(LCLINTR) +functionconstraint globalvariable.c
-
+ $(LCLINTR) +arrayBounds +arrayBoundsRead globalvariable.c
strchr:
@cd strchr; \
- $(LCLINTR) -f .lclintrc -booltype "lltX_bool" strchr.c
+ $(LCLINTR) +arrayBounds +arrayBoundsRead strchr.c
for:
@cd for; \
- $(LCLINTR) -f .lclintrc -booltype "lltX_bool" for.c
+ $(LCLINTR) +arrayBounds +arrayBoundsRead for.c
tests2.5:
setenv LCLINT '$(LCLINTRN)'; cd tests2.5 ; $(MAKE) -e
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include "bool.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include "bool.h"
# include "mut.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include "bool.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
test4.c: (in function t)
test4.c:6:3: Variable g used before definition
-test4.c:6:3: Unresolved constraint:
- Lclint is unable to resolve Requires: : MAXSET ((g @ test4.c:6:3 ) ) >= (
- 100 ) needed to satisfy Requires: : MAXSET ((g @ test4.c:6:3 ) ) >= (
- 100 )
+test4.c:6:3: Possible out-of-bounds store. Unable to resolve constraint:
+ requires: : maxSet ((g @ test4.c:6:3 ) ) >= ( 100 )
+ needed to satisfy precondition:
+ requires: : maxSet ((g @ test4.c:6:3 ) ) >= ( 100 )
test6.c:2:6: Function t defined more than once
test4.c:15:1: Previous definition of t
test6.c: (in function t)
test6.c:5:4: Variable g used before definition
-test6.c:6:3: Unresolved constraint:
- Lclint is unable to resolve Requires: : MAXSET ((g @ test6.c:5:4 ) ) >= (
- 1 ) needed to satisfy Requires: : MAXSET ((g @ test6.c:6:3 ) ) >= ( 0 )
-test6.c:6:10: Unresolved constraint:
- Lclint is unable to resolve Requires: : MAXREAD ((g @ test6.c:5:4 ) ) >=
- ( 2 ) needed to satisfy Requires: : MAXREAD ((g @ test6.c:6:10 ) ) >= (
- 1 )
+test6.c:6:3: Possible out-of-bounds store. Unable to resolve constraint:
+ requires: : maxSet ((g @ test6.c:5:4 ) ) >= ( 1 )
+ needed to satisfy precondition:
+ requires: : maxSet ((g @ test6.c:6:3 ) ) >= ( 0 )
+test6.c:6:10: Possible out-of-bounds read. Unable to resolve constraint:
+ requires: : maxRead ((g @ test6.c:5:4 ) ) >= ( 2 )
+ needed to satisfy precondition:
+ requires: : maxRead ((g @ test6.c:6:10 ) ) >= ( 1 )
Finished LCLint checking --- 6 code errors found
test4.c: (in function t)
test4.c:6:3: Variable g used before definition
-test4.c:6:3: Unresolved constraint:
- Lclint is unable to resolve Requires: : MAXSET ((g @ test4.c:6:3 ) ) >= (
- 100 ) needed to satisfy Requires: : MAXSET ((g @ test4.c:6:3 ) ) >= (
- 100 )
+test4.c:6:3: Possible out-of-bounds store. Unable to resolve constraint:
+ requires: : maxSet ((g @ test4.c:6:3 ) ) >= ( 100 )
+ needed to satisfy precondition:
+ requires: : maxSet ((g @ test4.c:6:3 ) ) >= ( 100 )
test6.c:2:6: Function t defined more than once
test4.c:15:1: Previous definition of t
test6.c: (in function t)
test6.c:5:4: Variable g used before definition
-test6.c:6:3: Unresolved constraint:
- Lclint is unable to resolve Requires: : MAXSET ((g @ test6.c:5:4 ) ) >= (
- 1 ) needed to satisfy Requires: : MAXSET ((g @ test6.c:6:3 ) ) >= ( 0 )
-test6.c:6:10: Unresolved constraint:
- Lclint is unable to resolve Requires: : MAXREAD ((g @ test6.c:5:4 ) ) >=
- ( 2 ) needed to satisfy Requires: : MAXREAD ((g @ test6.c:6:10 ) ) >= (
- 1 )
+test6.c:6:3: Possible out-of-bounds store. Unable to resolve constraint:
+ requires: : maxSet ((g @ test6.c:5:4 ) ) >= ( 1 )
+ needed to satisfy precondition:
+ requires: : maxSet ((g @ test6.c:6:3 ) ) >= ( 0 )
+test6.c:6:10: Possible out-of-bounds read. Unable to resolve constraint:
+ requires: : maxRead ((g @ test6.c:5:4 ) ) >= ( 2 )
+ needed to satisfy precondition:
+ requires: : maxRead ((g @ test6.c:6:10 ) ) >= ( 1 )
Finished LCLint checking --- 6 code errors found
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include "bool.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include <stdio.h>
# include "bool.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include "bool.h"
# include "bool.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include "bool.h"
# include "employee.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include "bool.h"
# include "eref.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include "bool.h"
# include "employee.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include "bool.h"
# include "employee.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include <stdio.h>
# include "bool.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include <stdio.h>
# include "bool.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include "bool.h"
# include "employee.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include "bool.h"
# include "eref.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include "bool.h"
# include "employee.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include "bool.h"
# include "employee.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include "bool.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include "bool.h"
# include "bool.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include <stdio.h>
# include "bool.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include <stdio.h>
# include "bool.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include "bool.h"
# include "employee.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include "bool.h"
# include "eref.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include "bool.h"
# include "employee.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include "bool.h"
# include "employee.h"
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
for.c: (in function f)
-for.c:13:5: Unresolved constraint:
- Lclint is unable to resolve Requires: : (i @ for.c:13:7 ) <= ( 10 )
- needed to satisfy Requires: : MAXSET ((t @ for.c:13:5 ) ) >= (i @
- for.c:13:7 )
+for.c:13:5: Possible out-of-bounds store. Unable to resolve constraint:
+ requires: : (i @ for.c:13:7 ) <= ( 10 )
+ needed to satisfy precondition:
+ requires: : maxSet ((t @ for.c:13:5 ) ) >= (i @ for.c:13:7 )
Finished LCLint checking --- 1 code error found
-+fcnconstraint
++arrayBounds
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-%FAILED Output from LCLint 3.0.0.8
+%FAILED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
Finished LCLint checking --- no code errors found
maxsetnoannotations.c: (in function noancopy)
-maxsetnoannotations.c:4:1: Unresolved constraint:
- Lclint is unable to resolve Requires: : MAXSET ((a @ maxsetnoannotations.c:4
- :9 ) ) >= MAXREAD ((b @ maxsetnoannotations.c:4:11 ) ) needed to satisfy
- Requires: : MAXSET ((a @ maxsetnoannotations.c:4:9 ) ) >= MAXREAD ((b @
- maxsetnoannotations.c:4:11 ) ) derived from strcpy precondition: Requires:
- : MAXSET ((<parameter 1> ) ) >= MAXREAD ((<parameter 2> ) )
+maxsetnoannotations.c:4:1: Possible out-of-bounds store. Unable to resolve
+ constraint:
+ requires: : maxSet ((a @ maxsetnoannotations.c:4:9 ) ) >= maxRead ((b @
+ maxsetnoannotations.c:4:11 ) )
+ needed to satisfy precondition:
+ requires: : maxSet ((a @ maxsetnoannotations.c:4:9 ) ) >= maxRead ((b @
+ maxsetnoannotations.c:4:11 ) )
+ derived from strcpy precondition: requires: :
+ maxSet ((<parameter 1> ) ) >= maxRead ((<parameter 2> ) )
Finished LCLint checking --- 1 code error found
-no-lib
-+fcnconstraint
++arrayBounds
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
unrecogCall.c:8:3: Unrecognized identifier: bar
initialization.c: (in function initialization)
initialization.c:5:10: Variable g declared but not used
-initialization.c:8:3: Unresolved constraint:
- Lclint is unable to resolve Requires: : MAXSET ((d @ initialization.c:3:14
- ) ) >= ( 2 ) needed to satisfy Requires: :
- MAXSET ((f @ initialization.c:8:3 ) ) >= ( 2 )
-initialization.c:5:14: Unresolved constraint:
- Lclint is unable to resolve Requires: : MAXREAD ((d @ initialization.c:3:14
- ) ) >= ( 22 ) needed to satisfy Requires: :
- MAXREAD ((e @ initialization.c:5:14 ) ) >= ( 22 )
+initialization.c:8:3: Possible out-of-bounds store. Unable to resolve
+ constraint:
+ requires: : maxSet ((d @ initialization.c:3:14 ) ) >= ( 2 )
+ needed to satisfy precondition:
+ requires: : maxSet ((f @ initialization.c:8:3 ) ) >= ( 2 )
+initialization.c:5:14: Possible out-of-bounds read. Unable to resolve
+ constraint:
+ requires: : maxRead ((d @ initialization.c:3:14 ) ) >= ( 22 )
+ needed to satisfy precondition:
+ requires: : maxRead ((e @ initialization.c:5:14 ) ) >= ( 22 )
simplifyTest.c: (in function fooSub)
-simplifyTest.c:3:3: Unresolved constraint:
- Lclint is unable to resolve Requires: : MAXSET ((s @ simplifyTest.c:3:3 ) )
- >= (i @ simplifyTest.c:3:5 ) needed to satisfy Requires: :
- MAXSET ((s @ simplifyTest.c:3:3 ) ) >= (i @ simplifyTest.c:3:5 )
+simplifyTest.c:3:3: Possible out-of-bounds store. Unable to resolve
+ constraint:
+ requires: : maxSet ((s @ simplifyTest.c:3:3 ) ) >= (i @
+ simplifyTest.c:3:5 )
+ needed to satisfy precondition:
+ requires: : maxSet ((s @ simplifyTest.c:3:3 ) ) >= (i @
+ simplifyTest.c:3:5 )
simplifyTest.c: (in function fooAdd)
-simplifyTest.c:10:3: Unresolved constraint:
- Lclint is unable to resolve Requires: : MAXSET ((s @ simplifyTest.c:10:3 )
- ) >= ((i @ simplifyTest.c:10:5 ) ) + (( 2 ) ) needed to satisfy Requires:
- : MAXSET ((s @ simplifyTest.c:10:3 ) ) >= ((i @ simplifyTest.c:10:5 ) ) +
- (( 2 ) )
+simplifyTest.c:10:3: Possible out-of-bounds store. Unable to resolve
+ constraint:
+ requires: : maxSet ((s @ simplifyTest.c:10:3 ) ) >= ((i @
+ simplifyTest.c:10:5 ) ) + (( 2 ) )
+ needed to satisfy precondition:
+ requires: : maxSet ((s @ simplifyTest.c:10:3 ) ) >= ((i @
+ simplifyTest.c:10:5 ) ) + (( 2 ) )
strncatNotReallyGood.c: (in function NotGoodfunc)
strncatNotReallyGood.c:4:29: Passed storage buffer not completely defined
(*buffer is undefined): strncat (buffer, ...)
-strncatNotReallyGood.c:4:21: Unresolved constraint:
- Lclint is unable to resolve Requires: :
- MAXREAD ((buffer @ strncatNotReallyGood.c:4:29 ) ) <= ( 0 ) needed to
- satisfy Requires: : MAXSET ((buffer @ strncatNotReallyGood.c:4:29 ) ) >=
- (MAXREAD ((buffer @ strncatNotReallyGood.c:4:29 ) )) + (( 255 ) )
+strncatNotReallyGood.c:4:21: Possible out-of-bounds store. Unable to resolve
+ constraint:
+ requires: : maxRead ((buffer @ strncatNotReallyGood.c:4:29 ) ) <= ( 0 )
+ needed to satisfy precondition:
+ requires: : maxSet ((buffer @ strncatNotReallyGood.c:4:29 ) ) >= (maxRead
+ ((buffer @ strncatNotReallyGood.c:4:29 ) )) + (( 255 ) )
Finished LCLint checking --- 8 code errors found
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include "bool.h"
;;LCLint Dump: null6.lcd
-;;LCLint 3.0.0.8 --- 19 July 2001
+;;LCLint 3.0.0.9 --- 23 July 2001
;;lib:168
;;ctTable
0 u-2 19 38
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-/* Output from LCLint 3.0.0.8 */
+/* Output from LCLint 3.0.0.9 */
# include "bool.h"
m.c:9:1: Index of possibly null pointer f: f
m.c:8:5: Storage f may become null
sizeof.c: (in function f)
-sizeof.c:17:1: Unresolved constraint:
- Lclint is unable to resolve Requires: :
- ( 2 ) >= ( 3 ) needed to satisfy Requires: : MAXSET ((x @ sizeof.c:17:1
- ) ) >= ( 3 )
+sizeof.c:17:1: Possible out-of-bounds store. Unable to resolve constraint:
+ requires: : ( 2 ) >= ( 3 )
+ needed to satisfy precondition:
+ requires: : maxSet ((x @ sizeof.c:17:1 ) ) >= ( 3 )
test3.c:2:6: Function t defined more than once
m.c:11:1: Previous definition of t
test3.c: (in function t)
-test3.c:9:3: Unresolved constraint:
- Lclint is unable to resolve Requires: :
- ( 99 ) >= ( 101 ) needed to satisfy Requires: : MAXSET ((g @
- test3.c:9:3 ) ) >= ( 101 )
+test3.c:9:3: Possible out-of-bounds store. Unable to resolve constraint:
+ requires: : ( 99 ) >= ( 101 )
+ needed to satisfy precondition:
+ requires: : maxSet ((g @ test3.c:9:3 ) ) >= ( 101 )
test7.c:2:6: Function t defined more than once
m.c:11:1: Previous definition of t
test7.c: (in function t)
-test7.c:8:3: Unresolved constraint:
- Lclint is unable to resolve Requires: : MAXSET ((j @ test7.c:8:3 ) ) >= (
- 0 ) needed to satisfy Requires: : MAXSET ((j @ test7.c:8:3 ) ) >= ( 0 )
-test7.c:6:3: Unresolved constraint:
- Lclint is unable to resolve Requires: : MAXSET ((g @ test7.c:4:3 ) ) >= (
- 4 ) needed to satisfy Requires: : MAXSET ((g @ test7.c:6:3 ) ) >= ( 2 )
+test7.c:8:3: Possible out-of-bounds store. Unable to resolve constraint:
+ requires: : maxSet ((j @ test7.c:8:3 ) ) >= ( 0 )
+ needed to satisfy precondition:
+ requires: : maxSet ((j @ test7.c:8:3 ) ) >= ( 0 )
+test7.c:6:3: Possible out-of-bounds store. Unable to resolve constraint:
+ requires: : maxSet ((g @ test7.c:4:3 ) ) >= ( 4 )
+ needed to satisfy precondition:
+ requires: : maxSet ((g @ test7.c:6:3 ) ) >= ( 2 )
Finished LCLint checking --- 7 code errors found
sizeof.c: (in function main)
-sizeof.c:6:2: Unresolved constraint:
- Lclint is unable to resolve Requires: :
- ( 2 ) >= ( 3 ) needed to satisfy Requires: : MAXSET ((x @ sizeof.c:6:2
- ) ) >= ( 3 )
+sizeof.c:6:2: Possible out-of-bounds store. Unable to resolve constraint:
+ requires: : ( 2 ) >= ( 3 )
+ needed to satisfy precondition:
+ requires: : maxSet ((x @ sizeof.c:6:2 ) ) >= ( 3 )
Finished LCLint checking --- 1 code error found
sizeof.c: (in function main)
-sizeof.c:6:2: Unresolved constraint:
- Lclint is unable to resolve Requires: :
- ( 2 ) >= ( 3 ) needed to satisfy Requires: : MAXSET ((x @ sizeof.c:6:2
- ) ) >= ( 3 )
+sizeof.c:6:2: Possible out-of-bounds store. Unable to resolve constraint:
+ requires: : ( 2 ) >= ( 3 )
+ needed to satisfy precondition:
+ requires: : maxSet ((x @ sizeof.c:6:2 ) ) >= ( 3 )
Finished LCLint checking --- 1 code error found
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-#include "../../lib/ansi.h"
+
void func () {
char *c;
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
;;LCLint Dump: newlint.lcd
-;;LCLint 3.0.0.8 --- 19 July 2001
+;;LCLint 3.0.0.9 --- 23 July 2001
;;lib:168
;;ctTable
0 u-2 19 38
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil
-%PASSED Output from LCLint 3.0.0.8
+%PASSED Output from LCLint 3.0.0.9
%LCLimports
%LCLSortTable
%LCLsort bool immutable nil nil