Subject: Re: bin/34067: awk dumps core when doing `make readme' in /usr/pkgsrc
To: None <gnats-bugs@NetBSD.org, gnats-admin@netbsd.org,>
From: Christos Zoulas <christos@zoulas.com>
List: netbsd-bugs
Date: 07/24/2006 17:06:00
On Jul 24,  7:00am, johan.wallen+gnats@tkk.fi (johan.wallen+gnats@tkk.fi) wrote:
-- Subject: bin/34067: awk dumps core when doing `make readme' in /usr/pkgsrc

| >Number:         34067
| >Category:       bin
| >Synopsis:       awk dumps core when doing `make readme' in /usr/pkgsrc
| >Confidential:   no
| >Severity:       critical
| >Priority:       medium
| >Responsible:    bin-bug-people
| >State:          open
| >Class:          sw-bug
| >Submitter-Id:   net
| >Arrival-Date:   Mon Jul 24 07:00:00 +0000 2006
| >Originator:     Johan Wallen
| >Release:        NetBSD 3.99.22 20060717
| >Organization:
| Helsinki University of Technology
| 	
| >Environment:
| 	
| 	
| System: NetBSD enigma.tcs.hut.fi 3.99.22 NetBSD 3.99.22 (GENERIC) #2: Mon Jul 17 22:52:48 EEST 2006 johan@enigma.tcs.hut.fi:/usr/obj/macppc/sys/arch/macppc/compile/GENERIC macppc
| Architecture: powerpc
| Machine: macppc
| pkgsrc from 20060717 (HEAD) 
| >Description:
| When doing `make readme' in /usr/pkgsrc, the following happens (redundant
| lines removed):
| 
| [...]
| Generating package README.html files

Can you try this?

christos

Index: b.c
===================================================================
RCS file: /cvsroot/src/dist/nawk/b.c,v
retrieving revision 1.11
diff -u -u -r1.11 b.c
--- b.c	26 Jun 2006 13:10:47 -0000	1.11
+++ b.c	24 Jul 2006 21:05:18 -0000
@@ -102,7 +102,7 @@
 		goto out;
 	fa->posns = p;
 
-	for (i = fa->state_count; i < new_count; ++i) {
+	for (i = fa->state_count; i <= new_count; ++i) {
 		fa->gototab[i] = calloc(1, NCHARS * sizeof (**fa->gototab));
 		if (fa->gototab[i] == NULL)
 			goto out;