Re: possible bug (rcs, version 5.9, occurs on Debian 7)

Hannes Küttner <[email protected]> Fri, 15 Aug 2014 10:27:01 +0200
Newsgroups gmane.comp.version-control.rcs.bugs
Message-ID <[email protected]>
Am 10.08.2014 10:26, schrieb Thien-Thi Nguyen:
> () Bostjan Vilfan <[email protected]>
> () Sat, 2 Aug 2014 11:24:37 +0200
>
>     I'm responding to your last message with the question
>     about "ci --version".  I made that check and version is
>     5.9.2. So, to reiterate, "ci -l In.cpp" succeeds while
>     "ci In.cpp" results in "Abort"
>
> Thanks for confirming.  I was able to reproduce the problem
> and am now investigating it...
>

I stumbled upon this bug on openSuse as well, a time ago and wasn't able 
to submit this patch by now.

For me it was a problem in prune in the ci.c file.
The wrong revision isn't as thought in the normal chain. It could also 
be the successor of the branchpoint.

Sorry if the explanation is kind of messy, the bug is half a year ago 
for me now :)

Attached is the patch that fixes the bug.
-- 
Mit freundlichem Gruß / With kind regards
Hannes Küttner

*MEINBERG Funkuhren GmbH & Co. KG*
Lange Wand 9
D-31812 Bad Pyrmont, Germany
Phone: +49 (0)5281 9309-0
Fax: +49 (0)5281 9309-30
Amtsgericht Hannover 17HRA 100322
Geschäftsführer: Günter Meinberg, Werner Meinberg, Andre Hartmann, Heiko 
Gerstung
Email: [email protected] <mailto:[email protected]>
Internet: www.meinberg.de <http://www.meinberg.de>
------------------------------------------------------------------------
*MEINBERG - Solutions for Time and Frequency Synchronization*
mbg_rcs_crash_on_revert_fix.patch (text/x-patch, 503 B)
diff -crB rcs-5.9.2/src/ci.c rcs-5.9.2-patched/src/ci.c
*** rcs-5.9.2/src/ci.c	2014-03-11 16:23:52.678978117 +0100
--- rcs-5.9.2-patched/src/ci.c	2014-03-11 16:15:32.000000000 +0100
***************
*** 288,293 ****
--- 288,300 ----
            return;
          }
      }
+     
+    /* Seems not to be in any branches of bp, check if bud is the successor of bp */
+    if (bp->ilk == wrong)
+      {
+        bp->ilk = NULL;
+        return;
+      }
  
    /* Should never get here.  */
    abort ();