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 <jnemeth%cue.bc.ca@localhost>
To: gnats-bugs%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Cc: 
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, buhrow%nfbcal.org@localhost 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 lothlorien.nfbcal.org 5.2_STABLE NetBSD 5.2_STABLE (RBL) #0: Thu Mar 27 10:15:56 PDT 2014 buhrow%lothlorien.nfbcal.org@localhost:/usr/src/sys/arch/i386/compile/RBL 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:
 } 
 } ./build.sh -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:
 
 HISTORY
      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
      argument.
 
 POSIX says:
 
 If resolved_name is a null pointer, the behavior of realpath() is
 implementation-defined.
 
 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 buhrow%nfbcal.org@localhost
 


Home | Main Index | Thread Index | Old Index