bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cvs rdiff -t consistently crashes with SEGV when processing files


From: Mark D. Baushke
Subject: Re: cvs rdiff -t consistently crashes with SEGV when processing files
Date: Thu, 27 Mar 2003 09:01:26 -0800

Derek Robert Price <derek@ximbiot.com> writes:

> Mark D. Baushke wrote:
> 
> >Derek Robert Price <derek@ximbiot.com> writes:
> >
> >>Mark D. Baushke wrote:
> >>    Did you save the command that reproduces the problem to a
> >> script?
> >
> >The command was just the 'cvs rdiff -t m' on the repository generated by
> >the commands in the script that James provided.
> >
> >
> >> Was it on a temporary repository?
> >
> >Yup, but I still have it around in /tmp/cvs-rdiff-bug
> >
> >
> >>If so, would you mind checking it into sanity.sh on both branches as a
> >>one liner tacked onto an rdiff test or something? I tried to check in
> >>a test fo this myself, but I could duplicate this with my existing
> >>repository and not the repo created by the rdiff test.
> >>
> >
> >Hmmm... I'll see what I can do.
> >
> >     -- Mark
> >
> 
> Okay, I'm back now and I didn't realize that James provided a script
> initially.  I just saw the command in one of the replies to his email
> and it seg faulted on my repository and I assumed it was all I needed.
> Unless you're almost done with this, I'll do it.

The patch below is just going thru testing on the cvs1-11-x-branch code
now. I'll commit it to the cvs1-11-x-branch when it finishes.

I have not yet ported the patch forward to the trunk, so I could let you
do that merge if you wish. :-)

        Enjoy!
        -- Mark

Index: ChangeLog
===================================================================
RCS file: /cvs/ccvs/src/ChangeLog,v
retrieving revision 1.2336.2.36
diff -u -p -r1.2336.2.36 ChangeLog
--- ChangeLog   26 Mar 2003 17:31:40 -0000      1.2336.2.36
+++ ChangeLog   27 Mar 2003 17:58:29 -0000
@@ -1,3 +1,9 @@
+2003-03-27  Mark D. Baushke  <mdb@cvshome.org>
+
+       * sanity.sh (rdiff2): Add new test case for SEGV problem reported
+       against cvs 1.11.5.
+       (Report from James Cribb <gjc@fortisclearing.com.au>)
+
 2003-03-26  Derek Price  <derek@ximbiot.com>
 
        * client.c: Fix, reorganize, and comment ifdefs for AUTH_CLIENT_SUPPORT
Index: sanity.sh
===================================================================
RCS file: /cvs/ccvs/src/sanity.sh,v
retrieving revision 1.752.2.17
diff -u -p -r1.752.2.17 sanity.sh
--- sanity.sh   26 Mar 2003 15:49:11 -0000      1.752.2.17
+++ sanity.sh   27 Mar 2003 17:57:30 -0000
@@ -721,8 +721,8 @@ if test x"$*" = x; then
        tests="${tests} commit-add-missing"
        tests="${tests} status"
        # Branching, tagging, removing, adding, multiple directories
-       tests="${tests} rdiff diff death death2 rm-update-message rmadd rmadd2"
-       tests="${tests} dirs dirs2 branches branches2 tagc tagf"
+       tests="${tests} rdiff rdiff2 diff death death2 rm-update-message rmadd"
+       tests="${tests} rmadd2 dirs dirs2 branches branches2 tagc tagf"
        tests="${tests} rcslib multibranch import importb importc"
        tests="${tests} update-p import-after-initial branch-after-import"
        tests="${tests} join join2 join3 join-readonly-conflict"
@@ -3994,6 +3994,73 @@ diff -c /dev/null trdiff/new:1\.1
                rm -r testimport
                rm -rf ${CVSROOT_DIRNAME}/trdiff
                ;;
+
+       rdiff2)
+         # Test for the segv problem reported by James Cribb
+         # Somewhere to work
+         mkdir rdiff2; cd rdiff2         
+         # Create a module "m" with files "foo" and "d/bar"
+         mkdir m; cd m
+         echo foo >foo
+         mkdir d
+         echo bar >d/bar
+         dotest_sort  rdiff2-1 \
+"${testcvs} -q import -I ! -m initial-import m vendor initial" \
+'
+
+N m/d/bar
+N m/foo
+No conflicts created by this import'
+
+         cd ..
+         rm -r m
+         
+         # Remove "foo"
+         dotest rdiff2-2 "${testcvs} get m" \
+"${PROG} [a-z]*: Updating m
+U m/foo
+${PROG} [a-z]*: Updating m/d
+U m/d/bar"
+         cd m
+         dotest rdiff2-3 "${testcvs} rm -f foo" \
+"${PROG} [a-z]*: scheduling .foo. for removal
+${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
+
+         dotest rdiff2-4 "${testcvs} commit -m Removed foo" \
+"Removing foo;
+${CVSROOT_DIRNAME}/m/foo,v  <--  foo
+new revision: delete; previous revision: 1\.1\.1\.1
+done"
+         
+         # Modify "d/bar"
+         echo foo >d/bar
+         dotest rdiff2-5 "${testcvs} commit -m Changed d/bar" \
+"Checking in d/bar;
+${CVSROOT_DIRNAME}/m/d/bar,v  <--  bar
+new revision: 1\.2; previous revision: 1\.1
+done"
+         
+         # Crash before showing d/bar diffs
+         dotest_fail rdiff2-6 "${testcvs} rdiff -t m" \
+"${PROG} [a-z]*: Diffing m
+${PROG} [a-z]*: Diffing m/d
+Index: m/d/bar
+diff -c m/d/bar:1\.1\.1\.1 m/d/bar:1\.2
+\*\*\* m/d/bar:1\.1\.1\.1      ${DATE}
+--- m/d/bar    ${DATE}
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+! bar
+--- 1 ----
+! foo"
+         if $keep; then
+               echo Keeping ${TESTDIR} and exiting due to --keep
+               exit 0
+         fi
+         cd ../..
+         rm -rf rdiff2
+         rm -rf ${CVSROOT_DIRNAME}/m
+         ;;
 
        diff)
          # Various tests specific to the "cvs diff" command.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]