File: bugs.html

package info (click to toggle)
splint 1%3A3.1.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 21,012 kB
  • ctags: 23,302
  • sloc: ansic: 150,869; yacc: 3,465; sh: 3,034; makefile: 2,160; lex: 412
file content (647 lines) | stat: -rw-r--r-- 17,967 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
<html>
<head>
<link rel="stylesheet" type="text/css" href="file:///usr/share/doc/splint-doc-html/html/splint.css" title="style1">
<title>Splint - Bugs</title>
</head>
<body>
<table border="0" rules="none" bgcolor="#FFFFFF" width="95%" align=center cellpadding=0 cellspacing=0>
<tr>
<td colspan=2 bgcolor="#FFFFFF"></td>
</tr>
<tr>
<td colspan=2 bgcolor="#FFFFFF"></td>
</tr>
<tr>
<td colspan=2 bgcolor="#FFFFFF"></td>
</tr>
<tr>
<td colspan=2 bgcolor="#FFFFFF"></td>
</tr>
<tr>
<td colspan=2 bgcolor="#FFFFFF"></td>
</tr>
<tr>
<td colspan=2 bgcolor="#FFFFFF"></td>
</tr>
<tr>
<td>
<font color="darkblue" face="arial,helvetica"><a href="http://www.splint.org/"><b>Splint</b> - Secure Programming Lint</a><br></font>
</td>
<td align=right>
<font face="arial,helvetica,sans-serif"><font color="darkblue">
<font size=-1>
<a href="mailto:info@splint.org">info@splint.org</a></font>
</font></font>
</td>
</tr>
<tr>
<td colspan=2 bgcolor="darkblue"></td>
</tr>
<tr>
<td colspan=2 bgcolor="darkblue"></td>
</tr>
<tr>
<td colspan=2 bgcolor="white"></td>
</tr>
<tr>
<td colspan=2 bgcolor="slate"></td>
</tr>
<tr>
<td>
<font face="arial,helvetica,sans-serif" size=-1>
<a
href="http://www.splint.org/download.html">Download</a>
- 
<A
HREF="http://www.splint.org/documentation/">Documentation</a>
-
<a href="http://www.splint.org/manual/">Manual</a>
-
<a
href="http://www.splint.org/links.html">Links</a>
</font>
</td>
<td align=right>
<font face="arial,helvetica,sans-serif" size=-1>
<a
href="http://www.splint.org/bugs.html">Reporting
Bugs</a> -
<a
href="http://www.splint.org/lists.html">Mailing
Lists</a> &nbsp;&nbsp;&nbsp;&nbsp;
<a
href="http://www.splint.org/sponsors.html">Sponsors</a>
-
<a
href="http://www.splint.org/credits.html">Credits</a>
</font>
</td>
</tr>
</table>

<p>
<blockquote>


<center><h1>
Splint Bugs
</h1></center>

This page documents reported bugs in Splint 3.1.2
<p>


Please check this page and make sure you are using the latest release
(Splint 3.1.2) before submitting a bug report.  If you discover a
bug that is not documented here, please report it to <a
href="mailto:splint-bug@cs.virginia.edu"><em>splint-bug@cs.virginia.edu</em></a>.
We prefer to receive bug reports by email, but you may also use the <a
href="http://sourceforge.net/tracker/?group_id=9538&atid=109538">web
form</a> on the <a href="http://sourceforge.net">SourceForge</a> <a
href="http://sourceforge.net/projects/splint/">project page</a>.
Include enough information and relevant files so that the bug may be
reproduced.  See <a
href="changes.html"><em>http://www.splint.org/changes.html</em></a>
for a detailed change log.

<p>
<h4>Confirmed Bugs</h4>
<p>

<b>osd.c does not support Apple</b>
<blockquote>
Patched osd.c to support Apple.
<p>
(Reported by Rob Cas, fixed in cvs code and build 3 distribution, 8
August 2007)
</blockquote>

<b>Function Pointers and memory management</b>
<blockquote>
Splint reports spurious errors for memory allocation concerning function
pointers.  Types declared as function pointers should not default to
only storage.
<p>
(Reported by Brian Quinlan, 26 Oct 2004.)
</blockquote>

<b>Unrelease fresh owned storage not reported</b>
<blockquote>
Splint does not report memory leaks for freshly allocated owned storage
that is not released:
<pre>
#include <stdlib.h>

typedef struct
{
  /*@owned@*/ int *pOwned;                
} TestStruct;

void testSplint(void)
{
  TestStruct myStruct;
  myStruct.pOwned = (int*)malloc(sizeof(int));
} /* No warning: should report memory leak. */
</pre>
<p>
(Reported by Brian Quinlan, 26 Oct 2004.)
</blockquote>

<b>Multi-line comments in macros and line numbers</b>
<blockquote>
Splint will miscalculate line numbers after multi-line comments in macro
definitions.  For example,
<pre>
#define FOO     /* a macro with a multiline comment
                 * gets the linecount wrong
                 */
</pre>
(Reported by Kevin Broadey, 17 September 2004.)
</blockquote>

<b>Definitions in switches</b>
<blockquote>
Splint incorrectly misses undefined variables on switch paths involving
default cases:
<pre>
static int foo (int a)
{
  int i, j;
  switch (a) {
    case 0: /* j not set on this path */
      i = 3;
      break;
    default: /* i not set on this path */
      j = 0;
      break;
    }
  return i + j;  /* no error for j */
}
</pre>
(Reported by Kevin Broadey, 17 September 2004.)
</blockquote>

<b>Parsing Syntactic comments</b>
<blockquote>
Splint will report an internal error for unbalanced syntactic comments
like
<pre>
void foo(/*@only*/ /*@null@*/ int*) {}
</pre>
<p>
(Reported by Tim Sylvester, 28 Jan 2004.)
</blockquote>

<b>--mode flags</b>
<blockquote>
Splint will report an internal error if a mode flag is used with
<tt>--</tt> (e.g., <tt>--strict</tt>).
<p>
(Reported by Toralf Foerster, 18 Dec 2003.)
</blockquote>

<b>Parsing Casts</b>
<blockquote>
Splint cannot parse the statement <tt>(int) x += 18;</tt>.
<p>
(Reported by Scott Simon, 23 Oct 2003)
</blockquote>

<b>Unsigned Promotion</b>
<blockquote>
Splint incorrectly types arithmetic expressions involving unsigned and
signed expressions (e.g., unsigned + signed is typed as unsigned).
<p>
(Reported by Cat Zimmermann, 21 August 2003.  Fixed in CVS 24 August
2003.)
<p>
<b>Correction: (1 November 2003)</b>: This is not a correct
interpretation of the ISO standard.  The type of unsigned + signed
should be unsigned.
</blockquote>

<b>Initializations Order</b>
<blockquote>
Splint doesn't analyze variable initializations in order.  For example,
it will report that <tt>pointer1</tt> is uninitialized in
<pre>
 char *pointer1=(char*)malloc(strlen(line)+1), *pointer2=pointer1;
</pre>
<p>
(Reported by Andrew Bishop.)
</blockquote>


<b>Spliced Macros</b>
<blockquote>
If a string literal is spliced that involves a macro constant (that is
not expanded), splint will produce a parse error.  e.g., <tt>"__"
TARGET_CPU</tt>.
</blockquote>

<b>boolean names with -nolib</b>
<blockquote>
Splint reports an internal error if -booltrue or -boolfalse are defined
with -nolib.  Reported by Anders B&auml;ck.
</blockquote>


<b>Unbraced Switch Statements</b>
<blockquote>
Splint produces an internal error for unbraced switch statements (which
are permitted by ISO C99).  For example, 
<pre>
switch(2) 
  case 1: 
  case 3: 
    return(1);
  return(0);
</pre>
(Reported by Dirk Noss)
</blockquote>

<h4>Bugs Fixed in 3.1.1</h4>
<b>Splint does not build on OS X</b>
<blockquote>
<p>
Splint 3.0.1.6 does not build on OS X.  This should be fixed in CVS.
<br>
We believe this was a problem with automake.
We are now using a new version of automake and this seems to have fixed the problem.

 We have successfully compiled the CVS version on SourceForge's compile farm's Mac OS X server.
</p>
</blockquote>

<b>Multiple passes on type definitions with /*@alt@*/</b>
<blockquote>
Splint will produce a parse error if a type definition like,
<pre>
typedef long /*@alt int@*/ newtype;
</pre>
is processed twice (for example if it is in a header file included
multiple times).
<p>
Reorted by Simon Hosie, fixed in CVS (2002-12-12).
</blockquote>

<b>Include flag handling</b>
<blockquote>
Splint now support -I &lt;dir&gt;, -i &lt;dir&gt; as well as the original -I&lt;dir&gt;.
<p>
Changed in CVS (2002-12-12) will be in 3.0.1.7.
</blockquote>

<b>Multiple globals clauses</b>

<blockquote>
Splint will produce a warning message, but then crash on an internal
error if multiple globals clauses are used. Reported by Gayath Ratnayaka.
<p>
Fixed in CVS (2002-12-04) will be in 3.0.1.7.
</blockquote>

<b>Spurious bounds errors in for loops</b>

<blockquote>
A bug caused Splint to spuriously report bounds errors in certain for loops such as:
<pre>
	int a[12];
	for (i = 0; i < 12; i++)
	  a[i] = 0;
</pre>

Fixed in CVS (2002-09-05) will be in 3.0.1.7.
</blockquote>

<b>Spurious bounds errors in if-else statements</b>
<blockquote>
Constraints were not generated correctly from the if statement test for each branch of an if-else statement.  This caused spurious bounds erros.
<br>
Fixed in CVS (2002-10-10) will be in 3.0.1.7.  Reported by Xiaolan Zhang.  
</blockquote>

<b>Incorrect Path Displayed</b>
<blockquote>
Splint incorrectly reported the file name path in error messages when it was given the absolute path  name of a file outside of the current directory and the subdirectories below the current directory.
<br>
e.g. after cd /home/; splint /tmp/prog.c   Splint will report tmp/prog.c instead of /tmp/prog.c
<br>
Fixed in CVS (2002-10-14) will be in 3.0.1.7.
</blockquote>

<b>Crashes if started with -i instead of -I</b>
<blockquote>
Splint crashed if it was started with the -i flags and given an invalid argument.
This was problematic because -i is easily confused with -I.
<br>
Fixed in CVS (2002-10-21) will be in 3.0.1.7.  Bug reported by Jesse Laird.
</blockquote>

<b>sizeof </b>
<blockquote>
Splint did not correctly handle code in which sizeof is applied to a string literal.  
e.g. malloc (sizeof ("abcd") );  This caused Splint to report spurious bounds errors.
<br>
Fixed in CVS (2002-11-29) will be in 3.0.1.7. 
Bug was reported by Xiaolan Zhang 
</blockquote>

<b>Directories in file list</b>
<blockquote>
Splint produces an internal bug report when directories are listed as
source files (e.g., splint .).  Reportes by Ullrich von Bassewitz.
Fixed in development code (2002-07-17), not yet in CVS.
</blockquote>

<b>emptyreturn flag</b>
<blockquote>

The emptyreturn flag doesn't work (it should be "emptyret" in
flags.def).  Reported by Adam Clarke.  Fixed in CVS (2002-07-08), will
be in 3.0.1.7.  (This is a temporary fix; a better solution to
canonicalizing flag names will be incorporated into a later release.)

</blockquote>
<p>
<b>getgrgid, getgrnam, getpwnam</b>
<blockquote>
These functions from grp.h in the Posix and Unix libraries should be
declared to return /*@observer@*/ references.  Reported by Enrico
Scholz.  Fixed in CVS (2002-07-08), will be in 3.0.1.7.
</blockquote>

<b>sys/resource.h</b>
<blockquote>
The sys/resource.h segment of the Unix library was not updated to
SUSv3.  The type of rlim_t, struct rlimit and struct rusage have been
updated.  Reported by Enrico Scholz.  Fixed in CVS (2002-07-08), will be
in 3.0.1.7.
</blockquote>

<b>Standard library missing snprintf</b>
<blockquote>
snprintf is in the unix library, but not the standard library.  It was
added to ISO C99, so should be in the standard library.  Reported by
Olivier L'Heureux.  Fixed in CVS (2002-07-08), will be in 3.0.1.7.
</blockquote>

<b>Char literal initializers</b>
<blockquote>
Splint misinterprets initializations of char arrays with string
literals (see ISO 6.7.8, Example 8):
<pre>
    char s[] = "abc";
    char *p = "abc";
</pre>
s is modifiable (not an observer); p is an observer.  Reported by
Olivier L'Heureux.  Fixed in CVS (before 2002-07-05), will be in 3.0.1.7.
</blockquote>

<P>
<b>pre-processor macros</b>
<blockquote>
The pre-processor will lose necessary whitespace before an identifier
that corresponds to the name of a parameterized macro inside a macro
expansion.  For example,
<pre>
   typedef void (*ErrorProc_t)( void ); 
   typedef void (*WriteProc_t)( int, ErrorProc_t);
   #define ErrorProc_t(name) void (name) ( void )
   #define PrintProc_t(name) void (name) ( int Num, ErrorProc_t /*<- this whitespace is lost!->*/ errorProc )
   static PrintProc_t (foo1); 
</pre>
Fixed in CVS (2002-07-03), will be in 3.0.1.7.  Reported by Adam Clarke.
</blockquote>
<p>
<b>offsetof syntax</b>
<blockquote>
Splint cannot parse offsetof expressions where the field designator is
an array fetch: <tt>offsetof(some_struct_t,d[index])</tt>.  
Fixed in CVS (2002-07-02), will be in 3.0.1.7.  Reported by Asger Overby.
</blockquote>

<b>struct iovec and struct msghdr declarations</b>
<blockquote>
The unix.h library declares the struct iovec and struct msghdr
structures without /*@dependent@*/ annotations on their pointer fields;
the implicit only annotations are incorrect for these.  The library
declarations were changed to:
<pre>
struct iovec {
  /*@dependent@*/ void *iov_base;
  size_t iov_len; /*: maxSet(iov_base) = iov_len */
};

struct msghdr {
  /*@dependent@*/ void *msg_name;		
  socklen_t msg_namelen;	/*: maxSet (msg_name) >= msg_namelen */
  /*@dependent@*/ struct iovec *msg_iov;	/* scatter/gather array */
  int msg_iovlen;		/* # elements in msg_iov */ /*: maxSet (msg_iov) >= msg_iovlen */
  /*@dependent@*/ void *msg_control;		/* ancillary data, see below */
  socklen_t msg_controllen;     /*: maxSet (msg_control) >= msg_controllen */
  int msg_flags;		/* flags on received message */
} ;
</pre>
Fixed in CVS (2002-07-02), will be in 3.0.1.7.  Reported by Enrico Scholz.
</blockquote>

<b>forward enum tags</b>
<blockquote>
Splint reports spurious redeclartion warnings for forward enum tags.
Fixed in CVS, will be in 3.0.1.7.
</blockquote>

<b>Line Numbers after multi-line macro instantiations</b>
<blockquote>
Splint will report the wrong line number after a multi-line macro
instantiation (it only counts as one line).  Reported by Andreas
Rasmusson.  Fixed in CVS, will be in 3.0.1.7.
</blockquote>

<b>GCC_INCLUDE_DIR definition</b>
<blockquote>
<tt>GCC_INCLUDE_DIR</tt> is not defined properly by configure on systems where
<tt>gcc</tt> is not found.  If you build on such a system, you need to
manually edit config.h to include the definition:
<blockquote>
<pre>
/* system include directory */
#define GCC_INCLUDE_DIR "/usr/include"
</pre>
</blockquote>
Fixed in CVS, will be in 3.0.1.7 release.
</blockquote>

<b>Array Initializers</b>
<blockquote>
Splint does not handle array initializations with missing values
correctly, for example <tt>int a[][2] = {{1,2},{3,4},{5,6}}</tt>.
(Reported by Ka-Liong Lau)
</blockquote>

<B>Warning message for -shiftsigned</b>
<blockquote>
The warning message for shiftsigned flag referse to the
<tt>shiftsize</tt> flag which does not exist.  It should be
<tt>shiftimplementation</tt> instead.  Reported by Melson Beebe.
Fixed in CVS, 13 Feb 2002.
</blockquote>
<b>-skipisoheaders</b>
<blockquote>
The skipisoheaders flag does not work as documented.  (It should be the
same as skipansiheaders.)  Reported by Jeroen Ruigrok van der Werven.
Fixed in CVS, will be in 3.0.1.7.
</blockquote>
<p>
<b>BUFSIZ</b>
<blockquote>
The standard library declares <tt>BUFSIZ</tt> as <tt>int</tt>, but it should be
<tt>size_t</tt>.  Reported by Walter Briscoe.  Fixed in CVS, will be in
3.0.1.7.

</blockquote>
<p>
<p>
<b>Types with fixed sized arrays</b>
<blockquote>
Splint may crash if there is a typedef involving a fixed size array.  For example: typedef int Buf[5];

This problem will only occur if the flags <b>bounds, boundsread, or boundswrite</b> are set.

A message like:
<blockquote>
*** Internal Bug at ctype.c:2687: llassert failed:
    (ctentry_getKind (cte) == CTK_COMPLEX) || (ctentry_getKind (cte) ==
    CTK_ARRAY) [errno: 25]
</blockquote>
will be printed before splint crashes.

(Reported by Jim Francis ) Fixed in CVS, 25 Jan 2002.
</blockquote>
<br><p>
<!--
<b>Nested Array Sizes</b>
<blockquote>
Splint reports incorred messages for initialization blocks for
multi-dimensional arrays, e.g.:

static char daytab[2][13] = {
        {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
        {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
    };

since the C syntax puts the array dimensions backwards.  (Reported by
Randi J. Relander) [evans - Fixed in CVS, 16 Jan 2002 and release 3.0.1.4]
</blockquote>
-->


<b>Char array initialized with strings containing escape sequences</b>

<blockquote>
Splint may erroneously warn that a "string literal is assigned to a char array too small to hold it" if an array is initialized with a string containing escape sequences.  (Reported by Jeff Johnson) Fixed in CVS, 22 Jan 2002.
</blockquote>
<p>

<b>Double Compilations</b> 
<blockquote>
On some platforms, if <tt>-j</tt> is used to do a parallel make, Splint will
compile some files more than once.  We're not sure why this happens, but
recommend not using the <tt>-j</tt> option to make.
<p>
(Reported by Matthias Andree, 14 Jan 2002.)
</blockquote>

</blockquote>

<table border="0" rules="none" bgcolor="#FFFFFF" width="95%" align=center cellpadding=0 cellspacing=0>

<tr valign=top>
<td colspan=2 bgcolor="darkblue"></td>
<tr valign=top>
<td colspan=2 bgcolor="darkblue"></td>
<tr valign=top>
<td colspan=2 bgcolor="white"></td>
</tr>
<tr valign=top>
<td width=135 >
<a href="http://www.splint.org"><img src="file:///usr/share/doc/splint-doc-html/html/glowingwall-narrows.jpg"
width=132 height=65 border=0 alt=""></a>
</td>
<td>
<table cellpadding=0 cellspacing=0 width="100%">
<tr>
<td colspan=2 bgcolor="slate"></td>
</tr>
<tr>
<td>
<font color="darkblue" face="arial,helvetica"><a href="http://www.splint.org/"><b>Splint</b> - Secure Programming Lint</a></font>
</td>
<td align=right>
<font face="arial,helvetica,sans-serif"><font color="darkblue">
<font size=-1>
<a href="mailto:info@splint.org">info@splint.org</a></font>
</font></font>
</td>
</tr>

<tr>
<td>
<font face="arial,helvetica,sans-serif" size=-1>
<a
href="http://www.splint.org/download.html">Download</a>
- 
<A
HREF="http://www.splint.org/documentation/">Documentation</a>
-
<a href="http://www.splint.org/manual/">Manual</a>
-
<a
href="http://www.splint.org/links.html">Links</a><br>

<a
href="http://www.splint.org/source.html">Source</a>
- 
<A
HREF="http://www.splint.org/linux.html">Linux</a>
-
<a href="http://www.splint.org/pubs.html">Publications</a>
-
<a
href="http://www.splint.org/talks.html">Talks</a><br>

</font>

</td>
<td align=right valign=top>

<font face="arial,helvetica,sans-serif" size=-1>
<a
href="http://www.splint.org/bugs.html">Reporting
Bugs</a> -
<a
href="http://www.splint.org/lists.html">Mailing
Lists</a> 

&nbsp;&nbsp;
<a
href="http://www.splint.org/sponsors.html">Sponsors</a>
-
<a
href="http://www.splint.org/credits.html">Credits</a>
</font>
</td>
</tr>

</table>

</td>
</tr>
</table>

</body>
</html>