Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Trouble outdating revisions: msg#00095

version-control.rcs.bugs

Subject: Trouble outdating revisions

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,

--
,''`.
: :' : Romain Francoise <rfrancoise@xxxxxxxxxx>
`. `' http://people.debian.org/~rfrancoise/
`-


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
hardware.arm.at...    cms.citadel.dev...    video.gstreamer...    java.facelets.u...    misc.basics.qna...    web.wiki.instik...    network.uip.use...    xdg.devel/2003-...    tex.bibtex.bibd...    finance.quotesp...    ietf.zeroconf/2...    redhat.blinux.g...    suse.db2/2003-0...    php.phpesp/2004...    uml.devel/2003-...    gnome.labyrinth...    qnx.openqnx.dev...    boot-loaders.gr...    db.dataperfect....    audio.audacity....    linux.uclinux.m...    editors.j.devel...    os.openbsd.tech...    kde.users.multi...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive 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

Navigation