Return-Path: owner-inn-workers-outgoing@vix.com
Received: from gw.home.vix.com (gw.home.vix.com [192.5.5.1]) by math.psu.edu (8.7.5/8.7.3) with ESMTP id KAA00421 for <barr@math.psu.edu>; Sat, 3 Aug 1996 10:25:29 -0400 (EDT)
Received: by gw.home.vix.com id HAA17873; Sat, 3 Aug 1996 07:24:36 -0700 (PDT)
X-btw: vix.com is also gw.home.vix.com and vixie.sf.ca.us
Received: by gw.home.vix.com id HAA17864; Sat, 3 Aug 1996 07:24:29 -0700 (PDT)
Received: (from fletcher@localhost) by cs.utexas.edu (8.7.1/8.7.1) id JAA28786; Sat, 3 Aug 1996 09:24:26 -0500 (CDT)
Message-Id: <199608031424.JAA28786@cs.utexas.edu>
From: fletcher@cs.utexas.edu (Fletcher Mattox)
Date: Sat, 3 Aug 1996 09:24:24 -0500
In-Reply-To: <199608022245.RAA13341@gasket.cs.utexas.edu>
X-Mailer: Mail User's Shell (7.2.5 10/14/92)
To: inn-workers@vix.com
Subject: Re: PROCtable corrupted in unoff4
Cc: inn@isc.org
Sender: owner-inn-workers@vix.com
Precedence: bulk

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;
      }

