Subject: misc/16361: make(1)'s job.c does not properly initialise postCommands
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jmallett@FreeBSD.org>
List: netbsd-bugs
Date: 04/15/2002 04:47:23
>Number:         16361
>Category:       misc
>Synopsis:       make(1)'s job.c does not properly initialise postCommands
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 15 04:48:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     J. Mallett
>Release:        -rHEAD from CVS
>Organization:
>Environment:
NA
>Description:
in job.c for make, postCommands is a pointer that is globally defined.  Its definition is to 0x0 due to the segment it is placed in, which happens to correspond to NULL which will work historically with make(1), but as NetBSD has switched to using NILGNODE and so on, it must be explicitly intiailised to such, or a core dump may result in some situations.
>How-To-Repeat:
Some complex build systems have triggered this for me.
>Fix:
-static GNode *postCommands;
+static GNode *postCommands = NILGNODE;
>Release-Note:
>Audit-Trail:
>Unformatted: