Return to BSD News archive
Newsgroups: comp.bugs.2bsd
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!nntp.coast.net!frankensun.altair.com!wlbr!moe.2bsd.com!sms
From: sms@moe.2bsd.com (Steven M. Schultz)
Subject: lint vs. the kernel (#329)
Organization: 2BSD, Simi Valley CA USA
Message-ID: <Dxuz2t.797@moe.2bsd.com>
Date: Tue, 17 Sep 1996 03:59:17 GMT
Lines: 162
Subject: lint vs. the kernel (#329)
Index: lib/mip/config.h 2.11BSD
Description:
lint fails when run against a kernel with QUOTAS defined.
Repeat-By:
cd /sys/YOUR_KERNEL
make -f lint_kernel lintkernel
Where lint_kernel is:
-----------cut here for lint_kernel--------------------
S= ../sys
P= ../pdp
U= ../pdpuba
H= ../h
NI= ../netinet
NS= ../netns
N= ../net
PI= ../pdpif
KDEFS= -DKERNEL -DQUOTA -DINET -DGENERIC -Dpdp11 -I. -I${H}
SDEFS= -DKERNEL -DQUOTA -DINET -DGENERIC -Dpdp11 -DSUPERVISOR -I. -I${H}
BASE= $U/br.c $U/dh.c $U/dhu.c $U/dhv.c $U/dr.c $U/dz.c $U/hk.c $U/ht.c \
$S/init_sysent.c \
$S/kern_clock.c $S/kern_descrip.c $S/kern_mman.c $S/kern_proc.c \
$S/kern_prot.c \
$S/kern_subr.c $S/kern_synch.c $P/machdep.c $U/ra.c $P/ram.c \
$U/rk.c $U/rx.c $U/si.c $S/subr_rmap.c $S/sys_generic.c $S/sys_inode.c \
$U/ts.c $S/tty.c $S/tty_conf.c $S/tty_subr.c $S/tty_tb.c \
$S/ufs_alloc.c \
$S/ufs_bio.c $S/ufs_dsort.c $S/ufs_fio.c $S/ufs_inode.c $S/ufs_namei.c \
$S/ufs_syscalls.c $S/vm_sched.c $U/xp.c $P/conf.c ioconf.c
OV1= $U/tm.c $U/rl.c $S/vm_swp.c $S/vm_text.c
OV2= $S/kern_acct.c $S/kern_exec.c $S/kern_exit.c $S/kern_fork.c \
$S/kern_resource.c
OV3= $S/kern_time.c $S/sys_process.c $S/ufs_mount.c \
$S/ufs_subr.c \
$S/uipc_syscalls.c
OV4= $U/dkbad.c $S/kern_sig.c $P/mem.c $S/subr_xxx.c $P/trap.c \
$S/tty_pty.c $S/tty_tty.c
OV5= $S/quota_kern.c $S/quota_ufs.c $S/quota_sys.c $S/ufs_bmap.c \
$S/sys_pipe.c
# OV6 gets the (hopefully) never used routines
OV6= $P/clock.c $U/dn.c $S/init_main.c $P/kern_pdp.c $P/machdep2.c \
$S/subr_prf.c $S/syscalls.c \
$S/subr_log.c $S/sys_kern.c $S/vm_swap.c
OV7= $U/lp.c $S/quota_subr.c $S/kern_xxx.c $P/cons.c $U/tmscp.c $S/vm_proc.c
OV8= $S/kern_sysctl.c $S/ufs_syscalls2.c
OV9= $S/ingreslock.c $U/tmscpdump.c $S/ufs_disksubr.c
KERNOBJ=${BASE} ${OV1} ${OV2} ${OV3} ${OV4} ${OV5} \
${OV6} ${OV7} ${OV8} ${OV9} ${OV10} ${OV11} ${OV12} \
${OV13} ${OV14} ${OV15} \
$P/enable34.c vers.c param.c
NETOBJ= $N/af.c ${NS}/idp_usrreq.c $N/if.c ${PI}/if_acc.c ${PI}/if_css.c \
${PI}/if_de.c \
${PI}/if_dmc.c ${PI}/if_ec.c ${PI}/if_en.c ${NI}/if_ether.c \
${PI}/if_il.c \
../netimp/if_imp.c ../netimp/if_imphost.c \
$N/if_loop.c ${PI}/if_qe.c $N/if_sl.c ${PI}/if_sri.c ${PI}/if_uba.c \
${PI}/if_vv.c ${NI}/in.c \
$P/in_cksum.c ${NI}/in_pcb.c ${NI}/in_proto.c ${NI}/ip_icmp.c \
${NI}/ip_input.c \
${NI}/ip_output.c \
${NS}/ns.c ${NS}/ns_error.c ${NS}/ns_input.c ${NS}/ns_ip.c \
${NS}/ns_output.c \
${NS}/ns_pcb.c \
${NS}/ns_proto.c $N/raw_cb.c ../netimp/raw_imp.c ${NI}/raw_ip.c \
$N/raw_usrreq.c $N/route.c ${NS}/spp_debug.c ${NS}/spp_usrreq.c \
$S/sys_socket.c \
$S/sys_net.c ${NI}/tcp_debug.c ${NI}/tcp_input.c ${NI}/tcp_output.c \
${NI}/tcp_subr.c \
${NI}/tcp_timer.c ${NI}/tcp_usrreq.c ${NI}/udp_usrreq.c \
$S/uipc_domain.c \
$S/uipc_mbuf.c \
$S/uipc_proto.c $S/uipc_socket.c $S/uipc_socket2.c $S/uipc_usrreq.c
lintkernel:
lint -hbxn ${KDEFS} ${KERNOBJ}
lintnet:
lint -hbxn ${SDEFS} ${NETOBJ}
-------------------end lint_kernel-------------------
Fix:
lint has always been right up against the limits of not being
able to handle the kernel. With the addition of disklabels
to the system the number of items that lint has to know the
size of (structures for the most part) increased to the point
that lint failed with "dimension table overflow".
The fix was to slightly decrease the size of the symbol table and
increase the 'dimension' table by about 10%. lint can now once again
handle the full kernel (with QUOTAS and networking).
Eventually the "right thing" to do would be to revisit the portable
C compiler (from which lint borrows heavily) and rewrite the storage
management to use a "VM tmp file" (a la 'ld'). For now the fix below
will have to suffice.
To apply this update cut where indicated, saving to a file (/tmp/329)
and then:
patch -p0 < /tmp/329
cd /usr/src/usr.bin/lint
make
make install
make clean
This and previous updates are available via anonymous FTP to either
moe.2bsd.com or ftp.iipo.gtegsc.com in the directory /pub/2.11BSD.
-------------------------cut here----------------------------
*** /usr/src/lib/mip/config.h.old Tue Jan 17 23:59:48 1995
--- /usr/src/lib/mip/config.h Sun Sep 15 01:47:24 1996
***************
*** 1,4 ****
! /* config.h 4.3.1 95/01/17 */
#ifndef _CONFIG_
#define _CONFIG_
--- 1,4 ----
! /* config.h 4.3.2 1996/9/14 */
#ifndef _CONFIG_
#define _CONFIG_
***************
*** 26,33 ****
#define TREESZ 1000 /* parse tree table size */
#endif
#define BCSZ 100 /* break/continue table size */
! #define SYMTSZ 925 /* symbol table size */
! #define DIMTABSZ 1050 /* dimension/size table size */
#define PARAMSZ 130 /* parameter stack size */
#define SWITSZ 210 /* switch table size */
#define DELAYS 20 /* delayed evaluation table size */
--- 26,33 ----
#define TREESZ 1000 /* parse tree table size */
#endif
#define BCSZ 100 /* break/continue table size */
! #define SYMTSZ 915 /* symbol table size */
! #define DIMTABSZ 1170 /* dimension/size table size */
#define PARAMSZ 130 /* parameter stack size */
#define SWITSZ 210 /* switch table size */
#define DELAYS 20 /* delayed evaluation table size */
*** /VERSION.old Mon Jul 22 19:48:37 1996
--- /VERSION Sun Sep 15 22:15:36 1996
***************
*** 1,4 ****
! Current Patch Level: 328
2.11 BSD
============
--- 1,4 ----
! Current Patch Level: 329
2.11 BSD
============