Subject: Re: PROCtable corrupted in unoff4
From: [email-masked] (Fletcher Mattox)
To: [email-masked]
Cc: [email-masked]
Date: Sat, 3 Aug 1996 09:24:24 -0500

I wrote:
> I'm getting consistent segfaults in SITEprocdied() because PROCtable has
> somehow become corrupted.  Notice that PROCtablesize is way too big.

When PROCtable is expanded, new entries are not initialised.  This
causes lots of problems. :)  In some of my core files, the table had grown
to over 100,000 entries (six bytes each), which is searched linearly
in many places.  This may explain my observation that innd gets better
performance if I kill and restart it daily.

This patch is for INN-1.4unoff4, but it's needed in INN-1.5a2, as well.

*** proc.c.orig	Sat Aug  3 08:57:08 1996
--- proc.c	Sat Aug  3 09:00:17 1996
***************
*** 140,145 ****
--- 140,147 ----
      if (i < 0) {
  	/* Ran out of room -- grow the table. */
  	RENEW(PROCtable, PROCESS, PROCtablesize + 20);
+ 	for (pp = &PROCtable[PROCtablesize], i=20; --i >= 0; pp++)
+ 	    *pp = PROCnull;
  	pp = &PROCtable[PROCtablesize];
  	PROCtablesize += 20;
      }