[Needs a test case. Patch looks plausible although I haven't looked carefully at the code. -kingdon] Date: Thu, 30 Apr 1998 16:49:12 -0400 From: mike@clove.com (Mike Howard) To: bug-cvs@gnu.org Subject: a CVS bug I was trying the new perserve permissions option while doing cvs import and got consistent core dumps. Traced it back to a uninitialized 'hardlist'. This patch stopped the core dumps. *** cvs/src/import.c:1.1.1.1 Thu Apr 2 15:40:08 1998 --- cvs/src/import.c Thu Apr 30 14:28:04 1998 *************** *** 271,276 **** --- 271,308 ---- (void) fprintf (logfp, "%s\n\t\t", argv[i]); (void) fprintf (logfp, "\n"); + /* MSH - 4/1/98 - cvs import fails with core dump because: + (gdb) where + #0 0x2eaa8 in addnode (list=0x0, p=0xac0c0) at hash.c:281 + #1 0x2e450 in lookup_file_by_inode ( + filepath=0xe6220 "/tmp/cvs-serv549/CREDITS") at hardlink.c:182 + #2 0x44fc8 in RCS_checkin (rcs=0xad668, workfile=0xad81a "CREDITS", + message=0xaab30 "RedHat 4.2\n", rev=0xab730 "1.1.1", flags=4) at rcs.c:4490 + #3 0x333c4 in add_rev (message=0xaab30 "RedHat 4.2\n", rcs=0xad668, + vfile=0xad81a "CREDITS", vers=0x0) at import.c:680 + #4 0x331ec in update_rcs_file (message=0xaab30 "RedHat 4.2\n", + vfile=0xad81a "CREDITS", vtag=0xab510 "RedHat", targc=1, targv=0xab844, + inattic=0) at import.c:604 + #5 0x33098 in process_import_file (message=0xaab30 "RedHat 4.2\n", + vfile=0xad81a "CREDITS", vtag=0xab510 "RedHat", targc=1, targv=0xab844) + at import.c:533 + #6 0x32e24 in import_descend (message=0xaab30 "RedHat 4.2\n", + vtag=0xab510 "RedHat", targc=1, targv=0xab844) at import.c:426 + #7 0x3298c in import (argc=3, argv=0xab83c) at import.c:275 + #8 0x518a0 in do_cvs_command (cmd_name=0x8e190 "import", + command=0x32234 ) at server.c:2327 + #9 0x52a9c in serve_import (arg=0xab526 "") at server.c:3109 + #10 0x54980 in server (argc=679128, argv=0xeffffee8) at server.c:4551 + #11 0x3a464 in main (argc=1, argv=0xeffffee8) at main.c:929 + */ + #ifdef PRESERVE_PERMISSIONS_SUPPORT + if (preserve_perms) + { + extern List *hardlist; + hardlist = getlist (); + } + #endif + /* Just Do It. */ err = import_descend (message, argv[1], argc - 2, argv + 2); if (conflicts) Mike Howard