Subject: bin/10245: make go boom in pkgsrc
To: None <gnats-bugs@gnats.netbsd.org>
From: None <dogcow@redback.com>
List: netbsd-bugs
Date: 05/31/2000 14:29:17
>Number:         10245
>Category:       bin
>Synopsis:       make go boom in pkgsrc
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 31 14:30:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Tom Spindler
>Release:        <NetBSD-current source date>31 May 2000
>Organization:
redback networks
	
>Environment:
	
System: NetBSD gozer 1.4Z NetBSD 1.4Z (GOZER) #0: Wed May 31 12:49:37 PDT 2000 moofcsh@gozer:/build/src/sys/arch/i386/compile/GOZER i386


>Description:
It looks like some of the more complex statements in the pkgsrc makefiles blow
up but good with the new changes to var.c. I base this from the backtrace of
make, especially comparing frame 1 and 4:

(gdb) bt
#0  0x804df36 in Hash_FindEntry (t=0x807ce30, 
    key=0x80793cc "MASTER_SITE_BACKUP") at hash.c:194
#1  0x8057d51 in VarFind (name=0x80793cc "MASTER_SITE_BACKUP", ctxt=0x807cdf0, 
    flags=0) at var.c:289
#2  0x8057fb3 in Var_Set (name=0x80793cc "MASTER_SITE_BACKUP", 
    val=0x8086300 "suse63/", ctxt=0x807cdf0) at var.c:449
#3  0x8059ed3 in Var_Parse (
    str=0x807f480 "ftp://ftp.netbsd.org/pub/NetBSD/packages/distfiles/  ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/", ctxt=0x8061000, err=0, 
    lengthPtr=0xbfbfc7dc, freePtr=0xbfbfc7e0) at var.c:1964
#4  0x805adff in Var_Subst (var=0x0, 
    str=0x8085c15 "${MASTER_SITE_BACKUP:=${DIST_SUBDIR}/}", ctxt=0x8061000, 
    undefErr=0) at var.c:2648
#5  0x805403d in Parse_DoVar (line=0x8085c00 "MASTER_SITE_BACKUP", 
    ctxt=0x8061000) at parse.c:1520
#6  0x80550ea in Parse_File (name=0x805caae "Makefile", stream=0x480f99c0)
    at parse.c:2592
#7  0x8051ea5 in ReadMakefile (p=0x805caae, q=0x0) at main.c:951
#8  0x8051a83 in main (argc=3, argv=0xbfbfdab8) at main.c:756
#9  0x8049805 in ___start ()


	
>How-To-Repeat:
p0 root@gozer: /usr/pkgsrc/emulators/suse_linux 78 % make
===> Validating dependencies for suse_linux-6.3
Segmentation fault - core dumped
*** Error code 139

Stop.

	
>Fix:
	
Back out to version 1.43 of var.c.

>Release-Note:
>Audit-Trail:
>Unformatted: