[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Fix corner case bug in libsvn_diff

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2006-02-08 08:03:32 CET

On Wed, 8 Feb 2006, Sander Striker wrote:

> Peter N. Lundblad wrote:
> > Hi,
> >
> > While testing the new diff stuff (ignore whitespace etc.), I changed the
> > token read chunk size from 128K to 4, and found an old corner case bug.
> > The problem is that the code will return a spurious empty token if the
> > file is exactly n*CHUNK_SIZE bytes long (n>0). This confuses the diff
> > algorithm, which thinks that the file has an extra line. Attached is a
> > fix for this, which seems a little clumsy. If anyone has a better
> > solution, feel free to suggest/commit.
>
> The fix makes sense. Though I'd avoid calculating the hash as well.
>
Good point. Will do.

> > Note that this is in 1.3 (and probably earlier)
>
> Yes, this has probably been there since the start. Nice catch.

Just don't get the impression that I found it by looking at the code:-)

Thanks,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Feb 8 08:04:06 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.