NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/54574: usr.bin/make/parse.c $Id: 1.231 drops core on NetBSD-5.2 in realpath(3)

The following reply was made to PR toolchain/54574; it has been noted by GNATS.

From: John Nemeth <>
Subject: Re: bin/54574: usr.bin/make/parse.c $Id: 1.231 drops core on NetBSD-5.2 in realpath(3)
Date: Wed, 25 Sep 2019 22:22:05 -0700

 On Sep 26,  2:55am, wrote:
 } >Number:         54574
 } >Category:       bin
 } >Synopsis:       usr.bin/make/parse.c $Id: 1.231 drops core in realpath(3) on NetBSD-5.2
 } >Arrival-Date:   Thu Sep 26 02:55:00 +0000 2019
 } >Originator:     Brian Buhrow
 } >Release:        NetBSD 5.2_STABLE
 } >Organization:
 } NFB of California
 } >Environment:
 } System: NetBSD 5.2_STABLE NetBSD 5.2_STABLE (RBL) #0: Thu Mar 27 10:15:56 PDT 2014 i386
 } Architecture: i386
 } Machine: i386
 } >Description:
 } When trying to build NetBSD-9 release on a NetBSD-5.2 system using sources
 } from the netbsd-9 branch, nbmake core dumps when realpath is called from
 } usr.bin/make/parse.c.  It appears the changes sjg made in Revision 1.231 of
 } parse.c are the culprit.  Using versions of parse.c older than 1.231 run
 } without trouble on NetBSD-5.2.
 } >How-To-Repeat:
 } Download the src-90 source tree on a NetBSD-5.2 system.
 } Clear your obj directory.
 } Then run:
 } ./ -m amd64 -D /var/tmp/netbsd-90-64 -O /usr/local/netbsd/obj-64 -j 4 release
 } >Fix:
 } Figure out why realpath is seg faulting with the pointers given it by
 } parse.c as added in parse.c, 1.231.
 } >Unformatted:
      The manpage for realpath(3) says:
      The realpath() function call first appeared in 4.4BSD.  In NetBSD 7.0 the
      function was updated to accept a NULL pointer for the resolvedname
 POSIX says:
 If resolved_name is a null pointer, the behavior of realpath() is
 parse.c:1.231 in ParseVErrorInternal() calls realpath() with a null
 pointer for resolved_name thus relying on the NetBSD 7.0 behaviour.
 This is a portability bug.
 }-- End of excerpt from

Home | Main Index | Thread Index | Old Index