Date: Fri, 29 May 1998 17:49:21 -0400 (EDT) From: njs3@doc.ic.ac.uk To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/6790: [PATCH] make(1) coredumps in debugging mode g2 Message-ID: <199805292149.RAA06615@www.in-design.com>
index | next in thread | raw e-mail
>Number: 6790
>Category: bin
>Synopsis: [PATCH] make(1) coredumps in debugging mode g2
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri May 29 14:50:00 PDT 1998
>Last-Modified:
>Originator: nsmart
>Organization:
>Release: FreeBSD 2.2.5-RELEASE i386
>Environment:
>Description:
make(1) coredumps in debugging mode g2 because memory is
free()'d which is required later by a debugging routine.
>How-To-Repeat:
www% make -d g2 2>&1 | grep "(null)"
(null)
www% cat Makefile
FOO = bar
feh:
echo ${FOO}
foo: feh
The (null) is a result of a null pointer being passed to
printf, this causes a coredump in Solaris. (I am working
on an autoconf package of pmake)
>Fix:
*** compat.c~ Fri May 29 22:40:15 1998
--- compat.c Fri May 29 22:35:01 1998
***************
*** 333,340 ****
}
exit(1);
}
! free(cmdStart);
! Lst_Replace (cmdNode, (ClientData) NULL);
/*
* The child is off and running. Now all we can do is wait...
--- 335,350 ----
}
exit(1);
}
!
! /* we need to print out the command associated with this Gnode in
! Targ_PrintCmd from Targ_PrintGraph when debugging at level g2,
! in main(), Fatal() and DieHorribly(), therefore do not free it
! when debugging. */
!
! if (!DEBUG(GRAPH2)) {
! free(cmdStart);
! Lst_Replace (cmdNode, cmdp);
! }
/*
* The child is off and running. Now all we can do is wait...
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805292149.RAA06615>
