|
|
Choosing A Webhost: |
Re: Trouble outdating revisions: msg#00102version-control.rcs.bugs
I verified the bug with the following script. The segmentation fault also creates a deadlock, with RCS's internal locking mechanism, on the RCS file. #!/bin/bash file=foo echo Hello, world >${file} ci -t-'' '-m1.1 revision' ${file} rcs -o1.1 ${file} echo Hello, world >${file} ci '-msecond 1.1 revision' ${file} echo 42 >>${file} rcs -l ${file} ci '-m1.2 revision' ${file} rcs -o1.2 ${file} rm -f ${file} RCS/${file},v On Mon, 16 May 2005, Romain Francoise wrote: > Hi, > > a Debian user reported that when you try to outdate the 1.1 revision, it > remains in the RCS file and doesn't actually get deleted. If you then > commit another 1.1 revision, you get both revisions in the RCS file. > See <URL: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=69193> for > more information. > > > While investigating this, I found a more serious problem in rcs, in some > conditions it segfaults when you try to outdate a revision. See the > following transcript: > > ,---- > | $ echo Hello, world >foo > | $ ci foo > | foo,v <-- foo > | enter description, terminated with single '.' or end of file: > | NOTE: This is NOT the log message! > | >> . > | initial revision: 1.1 > | done > | $ rcs -o1.1 foo > | RCS file: foo,v > | deleting revision 1.1 > | Do you really want to delete all revisions? [ny](n): y > | done > | $ echo Hello, world >foo > | $ ci foo > | foo,v <-- foo > | initial revision: 1.1 > | done > | $ echo 42 >>foo > | $ rcs -l foo > | RCS file: foo,v > | 1.1 locked > | done > | $ ci foo > | foo,v <-- foo > | new revision: 1.2; previous revision: 1.1 > | enter log message, terminated with single '.' or end of file: > | >> . > | done > | $ rcs -o1.2 foo > | RCS file: foo,v > | deleting revision 1.2 > | Segmentation fault (core dumped) > `---- > > The bug is pretty obvious: > > ,---- > | $ gdb /usr/bin/rcs core > | GNU gdb 6.3-debian > | Copyright 2004 Free Software Foundation, Inc. > | GDB is free software, covered by the GNU General Public License, and you are > | welcome to change it and/or 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. > | This GDB was configured as "i386-linux"...Using host libthread_db library > "/lib/tls/i686/cmov/libthread_db.so.1". > | > | Core was generated by `rcs -o1.2 foo'. > | Program terminated with signal 11, Segmentation fault. > | > | Reading symbols from /lib/tls/i686/cmov/libc.so.6...done. > | Loaded symbols for /lib/tls/i686/cmov/libc.so.6 > | Reading symbols from /lib/ld-linux.so.2...done. > | Loaded symbols for /lib/ld-linux.so.2 > | #0 scanlogtext (delta=0x0, edit=0) at rcs.c:919 > | 919 if (!delta->log.string) > | (gdb) > `---- > > So I suggest the following (also obvious) patch: > > ,---- > | --- rcs-5.7/src/rcs.c 1995-06-16 08:19:24.000000000 +0200 > | +++ rcs-5.7/src/rcs.c 2005-05-16 18:52:42.000000000 +0200 > | @@ -897,6 +897,9 @@ > | struct hshentry const *nextdelta; > | struct cbuf cb; > | > | + if (!delta) > | + return; > | + > | for (;;) { > | foutptr = 0; > | if (eoflex()) { > `---- > > Thanks,
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | 【大人専用】本気♂Devotion♀, info |
|---|---|
| Next by Date: | Re: Trouble outdating revisions, Romain Francoise |
| Previous by Thread: | Re: Trouble outdating revisions, Paul Eggert |
| Next by Thread: | Re: Trouble outdating revisions, Romain Francoise |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |