sendmail alias processing out of memory 2.9BSD PDP-11/70

Brian Kantor brian at sdcsvax.UUCP
Wed Oct 2 09:11:59 AEST 1985


Problem:
	Sendmail -bi reports out of memory - not enough core
	when trying to build the /usr/lib/aliases.{dir,pag} files
	from /usr/lib/aliases.  PDP-11/70 running Berkeley 2.9BSD

Repeat-by:
	feeding sendmail a /usr/lib/aliases file that has more than 400
	or so aliases.

Cause:
	sendmail's parseaddr routine mallocs space to return parts of
	the addresses being parsed attached to pointers supplied.
	Nobody ever returns this malloc'd space, so the process runs out
	of core. (note: you must have DBM defined in conf.h.  If not,
	the symbol table will run out of memory much sooner).

Cure: in /usr/src/usr.lib/sendmail/src/alias.c

	Change the call to parseaddr to return less information when
	parsing the left hand address of the alias:

		if (parseaddr(line, &al, 0, ':') == NULL)

	And add a few lines to free up the space malloc'd in parseaddr.

			store(key, content);

			/* free up the alloc'd memory so our poor 
			little PDP-11 doesn't run out of memory */
			free(al.q_user);
			al.q_user = NULL;
		}
------

	Brian Kantor	UC San Diego

	decvax\ 	brian at ucsd.arpa
	akgua  >---  sdcsvax  --- brian
	ucbvax/		Kantor at Nosc 



More information about the Comp.unix.wizards mailing list