Subject: Re: bin/22276: cvs BROKEN in current-20030726-063809
To: None <netbsd-bugs@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: netbsd-bugs
Date: 07/27/2003 00:16:05
Frank Kardel wrote:

> >Number:         22276
> >Category:       bin
> >Synopsis:       cvs abort updated becaus it can't change dirs to y or even incurrs SIGSEGV

If I run a "cvs update" in src/gnu/usr.bin; the first indication of
trouble is:

	cvs update: move away binutils/Makefile; it is in the way

An old cvs binary doesn't do this.  Also, this crude patch gets it
working:


Index: main.c
===================================================================
RCS file: /cvsroot/src/gnu/dist/cvs/src/main.c,v
retrieving revision 1.7
diff -d -p -u -r1.7 main.c
--- main.c      2003/07/25 20:37:31     1.7
+++ main.c      2003/07/26 14:14:27
@@ -1172,14 +1172,14 @@ getCVSDir(const char *suffix)
       if (buf[i][0] == NULL)
        break;
       if (strcmp(buf[i][0], suffix) == 0)
-       return buf[i][1];
+       return strdup(buf[i][1]);
     }
   if (i == 20)
     error(1, 0, "Out of static buffer space");
   buf[i][0] = suffix;
   buf[i][1] = xmalloc(len = strlen(cvsDir) + strlen(suffix) + 1);
   snprintf((char *)buf[i][1], len, "%s%s", cvsDir, suffix);
-  return buf[i][1];
+  return strdup(buf[i][1]);
 }
 
 void


which suggests something is getting stomped on, but I've yet to find
anywhere where something is getting overwritten in the non-patched case.

Simon.
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD Support and Service:         http://www.wasabisystems.com/