Bugs (and fixes) in pathalias

Geoff Kuenning geoff at desint.UUCP
Sun Jan 27 10:54:33 AEST 1985


There are a couple of small problems with the latest posting of pathalias:

    (1) The commentary in the makefile neglects to mention that the program
	uses 'index' and 'rindex'.  USG sites should add -Dindex=strchr and
	-Drindex=strrchr to their CFLAGS.
    (2) The commentary in the config.h file is misleading about the MYMALLOC
	routine.  If you examine the private malloc, you will discover that
	its speed is based on the fact that the private free is a no-op.  This
	is fine for virtual systems, but sites with limited memory should be
	aware that using MYMALLOC may cause pathalias to run out of memory.
    (3) Once you have undefined MYMALLOC, pathalias will begin to core dump,
	because it calls free several times with the same argument.  The fix
	is ridiculously simple, and is given below (note:  these are hand-
	built context diffs, so if 'patch' has trouble add the line by hand):

Index: pathalias.c

*** pathalias.c.orig	Sat Jan 26 01:34:22 PST 1985
--- pathalias.c	Sat Jan 26 16:47:34 PST 1985
***************
*** 88,93
  	}
  
  	/* merge child links into parent (now root) */
  	parent->n_link = lmerge(parent->n_link, child->n_link);
  
  	/* set up the alias pointers */
--- 88,94 -----
  	}
  
  	/* merge child links into parent (now root) */
  	parent->n_link = lmerge(parent->n_link, child->n_link);
+ 	child->n_link = 0;
  
  	/* set up the alias pointers */
-- 

	Geoff Kuenning
	Unix Consultant
	...!ihnp4!trwrb!desint!geoff



More information about the Comp.sources.bugs mailing list