Bug in System V make(1) - (nf)

bobvan at ccvaxa.UUCP bobvan at ccvaxa.UUCP
Wed Feb 1 13:56:26 AEST 1984


#N:ccvaxa:5200001:000:748
ccvaxa!bobvan    Jul 29 11:37:00 1983

I've just found a glaring, tho not terribly serious bug in System V make(1).
In the file misc.c, the return value from calloc is tested on lines 849 and
858.  Both times, the return value is tested for falure by comparing it to -1.
The malloc(3) manpage states that the failure return value from calloc() is 0.
Both bugs are in the routine setenv().  They cause setenv() to address fault
on a bad pointer, leaving a core file behind (from the child forked by make).
This bug should be agrivated only if make was nearly out of core already
and trying to allocate the environment for the child pushed it over the edge.
This showed up as an exit code of 132 from the child.

    Bob Van Valzah   uiucdcs!ccvaxa!bobvan   Compion Corp.   (217) 384-8587



More information about the Net.bugs mailing list