Item14368: Failure to handle edge cases leads to obscure bug in RCS.

pencil
Priority: Urgent
Current State: Closed
Released In: 2.1.4
Target Release: patch
Applies To: Extension
Component: RCSStoreContrib
Branches: master Release02x01 Item14288
Reported By: CrawfordCurrie
Waiting For:
Last Change By: GeorgeClark
Some edge cases can result in corrupt histories which when saved in RcsLite.

Several cases have been found in topics (generated in 1.1.9) where the RCS history becomes corrupted. The corruption observed strongly suggests that a diff is being done against text that is not plain text, but is itself a diff. Normally in a topic replacement we see something like this in the history:
1.1029
log
@save topic@
text
@d1 1
a1 1
%META:TOPICINFO{author="andyv" date="1453303902" format="1.1" version="1029"}%
but a corrupted history looks like this:
1.1029
log
@save topic@
text
@d1 26
a26 17
d1 1
a1 1
%META:TOPICINFO{author="andyv" date="1453303902" format="1.1" version="1029"}%
I have coded up a test for this pattern; delete, add, delete at the start of a topic. Under normal circumstances this pattern should never occur in a history unless it is broken.

I don't know how this corruption is caused, and can't find a way to reproduce it. The repair is really just to allow histories to be replayed when converting to a different store type e.g. PlainFile.

Topics that have been repaired will stay repaired when they are next saved.

-- CrawfordCurrie - 04 Apr 2017

 
Topic revision: r14 - 01 Jun 2017, GeorgeClark - This page was cached on 16 Nov 2017 - 03:01.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License