[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Seg fault in 1.12.5
From: |
Larry Jones |
Subject: |
Re: Seg fault in 1.12.5 |
Date: |
Wed, 25 Feb 2004 22:37:46 -0500 (EST) |
Steve McIntyre writes:
>
> Simply replacing the outer check with the old (1.12.1) code:
[...]
> _seems_ to work, but I don't pretend to be able to follow this code at
> 1.30AM.
It fixes the crash but reintroduces the bug that the code was originally
changed to fix. The correct fix should be:
Index: update.c
===================================================================
RCS file: /cvs/ccvs/src/update.c,v
retrieving revision 1.202.4.13
diff -u -r1.202.4.13 update.c
--- update.c 20 Feb 2004 21:21:06 -0000 1.202.4.13
+++ update.c 26 Feb 2004 02:35:09 -0000
@@ -2352,7 +2352,7 @@
* revision. i.e. we know that diff3(file2,file1,file2) will produce
* file2.
*/
- if (vers->ts_user
+ if (vers->vn_user != NULL && vers->ts_user != NULL
&& strcmp (vers->ts_user, vers->ts_rcs) == 0
&& strcmp (rev2, vers->vn_user) == 0)
{
I'd be very interested to know an easy way to reproduce the problem,
though. It would occur when there's a file in the current directory
(ts_user not NULL) that did not come from the repository and has not
been added (vn_user NULL), but nonetheless has a corresponding
repository file (vn_rcs and ts_rcs not NULL or we wouldn't have gotten
to this code) -- I haven't been able to come up with a scenario where
that occurs.
I've checked the above fix in on the stable branch, but cvs.cvshome.org
went catatonic immediately afterwards so I haven't been able to update
the trunk.
-Larry Jones
Isn't it sad how some people's grip on their lives is so precarious
that they'll embrace any preposterous delusion rather than face an
occasional bleak truth? -- Calvin