[Fix and testcase checked in 19 Sep 1997. -kingdon] From: brennan@amc.com Date: Tue, 13 Jan 1998 06:43:06 -0800 To: bug-cvs@prep.ai.mit.edu Subject: follow-up to bug report yesterday >Submitter-Id: net >Originator: Michael Brennan >Organization: net >Confidential: no >Synopsis: cvs log core dump >Severity: serious >Priority: >Category: cvs >Class: sw-bug >Release: cvs-1.9 >Environment: System: SunOS chaos 5.6 Generic sun4u sparc SUNW,Ultra-1 Architecture: sun4 >Description: correction from previous report: bug is repeatable bug is not related to redirection as previously reported Here is an rlog on file that causes problem: $ rlog /svt2/cvs/host/unix/svtui/mcdcwin.h RCS file: /svt2/cvs/host/unix/svtui/mcdcwin.h,v Working file: /svt2/cvs/host/unix/svtui/mcdcwin.h head: 1.1 branch: locks: strict access list: symbolic names: BeforeNewMakefiles: 1.1 RELEASE_1_4_16: 1.1 keyword substitution: kv total revisions: 1; selected revisions: 1 description: ---------------------------- revision 1.1 date: 1997/07/22 22:49:21; author: sheldon; state: Exp; *** empty log message *** ============================================================================= Here is stack dump under gdb: ; gdb /svt1/tools/src/Tars/cvs-1.9/src/cvs GDB is free software and you are welcome to distribute copies of it under certain conditions; type "show copying" to see the conditions. There is absolutely no warranty for GDB; type "show warranty" for details. GDB 4.16 (sparc-sun-solaris2.6), Copyright 1996 Free Software Foundation, Inc... (gdb) run log mcdcwin.h Starting program: /svt1/tools/src/Tars/cvs-1.9/src/cvs log mcdcwin.h warning: Unable to find dynamic linker breakpoint function. warning: GDB will be unable to debug shared library initializers warning: and track explicitly loaded dynamic code. RCS file: /svt2/cvs/host/unix/svtui/mcdcwin.h,v Working file: mcdcwin.h head: 1.1 branch: locks: strict access list: symbolic names: BeforeNewMakefiles: 1.1 RELEASE_1_4_16: 1.1 keyword substitution: kv total revisions: 1; selected revisions: 1 description: ---------------------------- revision 1.1 date: 1997/07/22 22:49:21; author: sheldon; state: Exp; Program received signal SIGSEGV, Segmentation fault. 0x40bc0 in log_version (log_data=0xefffee70, revlist=0x0, rcs=0xb0d58, ver=0xbc2c0, trunk=1) at log.c:1345 1345 if (p == NULL || p->data[0] == '\0') (gdb) p *p $1 = {type = RCSFIELD, next = 0xbc2e8, prev = 0xbc310, hashnext = 0xbc428, hashprev = 0xbc428, key = 0xbb728 "log", data = 0x0, delproc = 0} (gdb) >How-To-Repeat: >Fix: --- log.c.orig Tue Jan 13 06:37:03 1998 +++ log.c Tue Jan 13 06:37:25 1998 @@ -1342,7 +1342,7 @@ cvs_output ("\n", 1); p = findnode (ver->other, "log"); - if (p == NULL || p->data[0] == '\0') + if (p == NULL || !p->data || p->data[0] == '\0') cvs_output ("*** empty log message ***\n", 0); else {