[comp.bugs.sys5] lint pass2 error

ra@isncr.is.se (Robert Andersson) (11/16/88)

When running a *big* program through lint I consistently get the error message:
/usr/lib/lint2: lint pass2 error: Too many names

The program in question is some 20,000 lines, spread out over ~100 files and
~500 functions. It obviously overflows some internal lint buffer.
Exactly what does the error message mean, and is there a way around it,
like some 'undocumented' lint option or whatever?

The system I get this on is an NCR Tower 32 running vanilla SVR2.
-- 
Robert Andersson, International Systems, Oslo, Norway
Internet:         ra@isncr.is.se 
UUCP:             ...!{uunet,mcvax,enea}!isncr.is.se!ra
UUCP in Norway:   ...!ndosl!ifi!isncr.is.se!ra

thomas@uplog.se (Thomas Hameenaho) (11/16/88)

In article <173@isncr.is.se> ra@isncr.is.se (Robert Andersson) writes:
>When running a *big* program through lint I consistently get the error message:
>/usr/lib/lint2: lint pass2 error: Too many names
>
>The program in question is some 20,000 lines, spread out over ~100 files and
>~500 functions. It obviously overflows some internal lint buffer.
>Exactly what does the error message mean, and is there a way around it,
>like some 'undocumented' lint option or whatever?
>
>The system I get this on is an NCR Tower 32 running vanilla SVR2.
>-- 

It is an array of source file names that overflows. This table is 150 
elements in a vanilla SVR2 from Mot and SVR3.0 from at&t.
-- 
Real life:	Thomas Hameenaho		Email:	thomas@uplog.{se,uucp}
Snail mail:	TeleLOGIC Uppsala AB		Phone:	+46 18 189406
		Box 1218			Fax:	+46 18 132039
		S - 751 42 Uppsala, Sweden

rupley@arizona.edu (John Rupley) (11/17/88)

In article <173@isncr.is.se>, ra@isncr.is.se (Robert Andersson) writes:
> When running a *big* program through lint I consistently get the error message:
> /usr/lib/lint2: lint pass2 error: Too many names
> 
> The program in question is some 20,000 lines, spread out over ~100 files and
> ~500 functions. It obviously overflows some internal lint buffer.
> Exactly what does the error message mean, and is there a way around it,
> like some 'undocumented' lint option or whatever?
> 
> The system I get this on is an NCR Tower 32 running vanilla SVR2.

The relevant SVR2 limits that I have seen are 80 or 150 for the number of files
and 1024 for the symbol table size.  If you exceed either limit (your
error messaage corresponds to the number-of-files limit, I believe),
you may be able to:

(1) if you have source, recompile with NSZ and FSZ set to larger values;
this may not be possible with certain architectures (80286), without
a major rewrite of the code (arrays to pointers).

(2) if you do not have source:
(a) get your supplier to reconfigure lint2 (worth a :-?).
(b) construct a lint library containing all externals, and lint
file-by-file; you will that way get all the pass2 error messages about
inconsistent declarations, etc.; the constructing of the lint library
can be largely automated by use of a set of filters.

If anyone knows of other solutions, please post them.

John Rupley
rupley!local@megaron.arizona.edu

ra@isncr.is.se (Robert Andersson) (11/17/88)

In article <338@uplog.se>, thomas@uplog.se (Thomas Hameenaho) writes:
> In article <173@isncr.is.se> ra@isncr.is.se (Robert Andersson) writes:
>>When running a *big* program system through lint I consistently get the error message:
>>/usr/lib/lint2: lint pass2 error: Too many names
> 
> It is an array of source file names that overflows. This table is 150 
> elements in a vanilla SVR2 from Mot and SVR3.0 from at&t.

Nope, that cannot be the problem.  The system in question only contains
92 source files. Obviously there are other static limits within lint,
but what?

Hang on, I just had this idea... Could it be that #include'ed files also
count in this 150 file limit?
-- 
Robert Andersson, International Systems, Oslo, Norway
Internet:         ra@isncr.is.se 
UUCP:             ...!{uunet,mcvax,enea}!isncr.is.se!ra
UUCP in Norway:   ...!ndosl!ifi!isncr.is.se!ra

wu@spot.Colorado.EDU (WU SHI-KUEI) (11/18/88)

In article <173@isncr.is.se> ra@isncr.is.se (Robert Andersson) writes:
. . .
>The program in question is some 20,000 lines, spread out over ~100 files and
>~500 functions. It obviously overflows some internal lint buffer.
>Exactly what does the error message mean, and is there a way around it,
>like some 'undocumented' lint option or whatever?

I am not sure that this will help, but on our SVR2 AT&T 3B, running the 3.1
release of the compiler, lint has a -c option which allows you to run lint
on each of the source files individual source files.  Only the first pass 
is executed, with no checks for inter-function compatibility, and the
output is left in *.ln files.

Then, execute 'lint *.ln', which runs the remaining passes upon the
package as a whole.  One would hope that the *.ln files contain only data
needed to check inter-function compatibility, thus reducing the number of
names the second pass must deal with.

Incidentally, this is a neat feature to use with 'make' - individual source
files can be linted as they are created and then the whole shebang tested
for overall compatibility.

Hope this helps - In real life:
Carl Brandauer
{uunet|stcvax}!nbires!bdaemon!carl

guy@auspex.UUCP (Guy Harris) (11/18/88)

>When running a *big* program through lint I consistently get the error message:
>/usr/lib/lint2: lint pass2 error: Too many names
>
>The program in question is some 20,000 lines, spread out over ~100 files and
>~500 functions. It obviously overflows some internal lint buffer.
>Exactly what does the error message mean,

It means you've overflowed some internal lint buffer.

To be specific, you've overflowed the table that keeps track of file names.

>and is there a way around it, like some 'undocumented' lint option
>or whatever?

No.  The line in the S5R3 "lint" is

	if ( ( cfno = ffree++ ) >= FSZ )
		lerror( "Too many names", CCLOSE | FATAL);

and FSZ is a compile-time constant.  In S5R3, it's 150 (except on the
PDP-11, where it's 80...).