You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Garrett Rooney <ro...@electricjellyfish.net> on 2003/02/09 17:22:34 UTC

[PATCH] possible fix for diff coredumps (was Re: svn commit: rev 4805 - in trunk: . subversion/tests/libsvn_delta)

On Sunday, February 9, 2003, at 10:45 AM, Philip Martin wrote:

> Garrett Rooney <ro...@electricjellyfish.net> writes:
>
>> at least the first 'failure' in there seems to
>> produce a valid unified diff, it's just showing slightly more context
>> than you're expecting.
>
> Which probably indicates a bug :)  What happens when we extend the
> library to support a varying number of context lines?  I believe the
> current output is wrong.
>
> Lets see
>
> $ patch --dry-run foo15a < diff-foo15a-bar15a
> patching file foo15a
> Hunk #1 succeeded at 1 with fuzz 1.
>
> See that fuzz message?  Even patch thinks it's suspect.
>
>> perhaps these tests shouldn't be comparing against a cannonical 'good
>> result', but instead should be using patch to try to reconstruct the
>> original file from the diff, and verifying that it matches.
>
> I disagree.  A "diff" that simply deleted one file and added the
> second would do that, but it's not very useful.  These tests are
> designed to prohibit that.  Obviously in some cases the diff algorithm
> has to make arbitrary choices, but in the the cases I have tested
> explicitly I believe the diff output should be predictable.  Any
> variation it is most likely a bug.

ok, you convinced me ;-)

as for the other parts of the tests (the ones that dump core), here's a 
patch that 'fixes' it, although i'm nowhere near convinced it is 
correct, as i'm not sure how the diff/diff3 code works, so sander will 
have to look over them first.

-garrett


RE: [PATCH] possible fix for diff coredumps (was Re: svn commit: rev 4805 - in trunk: . subversion/tests/libsvn_delta)

Posted by Sander Striker <st...@apache.org>.
> From: Garrett Rooney [mailto:rooneg@electricjellyfish.net]
> Sent: Sunday, February 09, 2003 6:23 PM

> as for the other parts of the tests (the ones that dump core), here's a 
> patch that 'fixes' it, although i'm nowhere near convinced it is 
> correct, as i'm not sure how the diff/diff3 code works, so sander will 
> have to look over them first.

I did look over it and it is a partial fix.  The variables are accessed
later on in the code when there is a conflict to be examined.

Will take a closer look on wednesday.

Thanks,

Sander


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org