]> andersk Git - splint.git/commitdiff
Fixed fatal bug involving bounds checking of expressions of the form sizeof(variable).
authordrl7x <drl7x>
Fri, 3 Jan 2003 22:24:22 +0000 (22:24 +0000)
committerdrl7x <drl7x>
Fri, 3 Jan 2003 22:24:22 +0000 (22:24 +0000)
src/Makefile.am
src/Makefile.in
src/constraintExpr.c
src/cpplib.c

index b642546117b27edde69df6961e8113de65be9200..dd1f7f78703c4c16214aa009e0e843981846dbef 100644 (file)
@@ -395,6 +395,9 @@ lintnew: splintme
 splintme: 
        ./splint $(DEFAULT_INCLUDES) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) +singleinclude $(LINTSRC) $(OVERFLOWCHSRC) $(LCLSRC) -dump lclint +forcehints -misplacedsharequal +showsourceloc -unrecogcomments -supcounts -fcnuse -incondefs -exportlocal -constuse -mts file -mts filerw 
 
+lintbuffercheck: 
+       ./splint $(DEFAULT_INCLUDES) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) +singleinclude $(LINTSRC) $(OVERFLOWCHSRC) $(LCLSRC) -dump lclint +forcehints -misplacedsharequal +showsourceloc -unrecogcomments -supcounts -fcnuse -incondefs -exportlocal -constuse -mts file -mts filerw +bounds -DLINTBUFFERCHECK
+
 valsplint:
        valgrind -v --leak-resolution=high --num-callers=20 --show-reachable=no --leak-check=yes ./splint $(DEFAULT_INCLUDES) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) +singleinclude $(LINTSRC) $(OVERFLOWCHSRC) $(LCLSRC) -dump lclint +forcehints -misplacedsharequal +showsourceloc -unrecogcomments -supcounts -fcnuse -incondefs -exportlocal -constuse -mts file -mts filerw 
 
@@ -408,12 +411,6 @@ splintsome:
 splinttest: 
        ./splint $(DEFAULT_INCLUDES) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) +singleinclude test.c +forcehints -misplacedsharequal +showsourceloc -unrecogcomments -fcnuse -incondefs -exportlocal -constuse -mts file -mts filerw +keep +supcounts +partial -null
 
-
-lintbuffercheck: 
-       ./splint $(DEFAULT_INCLUDES) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) +singleinclude $(LINTSRC) $(LCLSRC) -dump lclint \
-                    +forcehints -misplacedsharequal +showsourceloc -unrecogcomments \
-                    -supcounts -fcnuse -exportlocal -constuse -mts file -mts filerw +bounds +boundsread +implictconstraint -dLINTBUFFERCHECK
-
 binDir = bin
 
 all: splint$(EXEEXT) ../$(top_builddir)/$(binDir)/splint$(EXEEXT)
index 79ceee8fa63940e2fb9abd2ffd5e1bd28926fbb9..6db7488248fdf8dc4529bc69266bebf52c71ebba 100644 (file)
@@ -1126,6 +1126,9 @@ lintnew: splintme
 splintme: 
        ./splint $(DEFAULT_INCLUDES) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) +singleinclude $(LINTSRC) $(OVERFLOWCHSRC) $(LCLSRC) -dump lclint +forcehints -misplacedsharequal +showsourceloc -unrecogcomments -supcounts -fcnuse -incondefs -exportlocal -constuse -mts file -mts filerw 
 
+lintbuffercheck: 
+       ./splint $(DEFAULT_INCLUDES) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) +singleinclude $(LINTSRC) $(OVERFLOWCHSRC) $(LCLSRC) -dump lclint +forcehints -misplacedsharequal +showsourceloc -unrecogcomments -supcounts -fcnuse -incondefs -exportlocal -constuse -mts file -mts filerw +bounds -DLINTBUFFERCHECK
+
 valsplint:
        valgrind -v --leak-resolution=high --num-callers=20 --show-reachable=no --leak-check=yes ./splint $(DEFAULT_INCLUDES) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) +singleinclude $(LINTSRC) $(OVERFLOWCHSRC) $(LCLSRC) -dump lclint +forcehints -misplacedsharequal +showsourceloc -unrecogcomments -supcounts -fcnuse -incondefs -exportlocal -constuse -mts file -mts filerw 
 
@@ -1138,11 +1141,6 @@ splintsome:
 splinttest: 
        ./splint $(DEFAULT_INCLUDES) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) +singleinclude test.c +forcehints -misplacedsharequal +showsourceloc -unrecogcomments -fcnuse -incondefs -exportlocal -constuse -mts file -mts filerw +keep +supcounts +partial -null
 
-lintbuffercheck: 
-       ./splint $(DEFAULT_INCLUDES) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) +singleinclude $(LINTSRC) $(LCLSRC) -dump lclint \
-                    +forcehints -misplacedsharequal +showsourceloc -unrecogcomments \
-                    -supcounts -fcnuse -exportlocal -constuse -mts file -mts filerw +bounds +boundsread +implictconstraint -dLINTBUFFERCHECK
-
 all: splint$(EXEEXT) ../$(top_builddir)/$(binDir)/splint$(EXEEXT)
 
 ../$(top_builddir)/$(binDir)/splint$(EXEEXT):  splint$(EXEEXT)
index b5c5de443ef4d0d00dd9ab97cb52ea7bde458de4..35dc50a35074e8e444a3b8f2afa9c3c2644752cc 100644 (file)
@@ -2384,7 +2384,11 @@ static /*@only@*/ constraintExpr  constraintTerm_simpleDivTypeExprNode(/*@only@*
                }
              else
                {
-                 ct2 = qtype_getType (exprData_getType(exprData_getSingle (t1->edata)->edata ) );
+                 exprNode tempE;
+               
+                 tempE = exprData_getSingle (t1->edata);
+                 
+                 ct2 =  exprNode_getType (tempE); 
                }
              if (ctype_match (ctype_makePointer(ct2), ct) )
                {
index 9e35a66a7fe037765d39ec257c757838a036a0a6..767e60a2ae4df7e7884c53d08dfb5781d8361a5a 100644 (file)
@@ -112,6 +112,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 /* Warnings for using sprintf - suppress them all for now... */
 /*@-bufferoverflowhigh@*/
+/*@-bounds@*/
 
 #define NO_SHORTNAMES
 
@@ -8492,3 +8493,4 @@ void cppBuffer_forward (cppBuffer *buf, int n)
 }
 
 /*@=bufferoverflowhigh@*/
+/*@=bounds@*/
This page took 0.046402 seconds and 5 git commands to generate.