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

Re: svn commit: r1138516 - /subversion/trunk/subversion/libsvn_client/ra.c

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Thu, 23 Jun 2011 02:21:24 +0300

Stefan Sperling wrote on Wed, Jun 22, 2011 at 22:53:13 +0200:
> On Wed, Jun 22, 2011 at 04:43:38PM -0400, Greg Stein wrote:
> > Is there a way that this can be tested? ie. avoid similar situations
> > in the future?
>
> I don't know. I came across this because I saw code that did:
>
> peg_rev = INVALID_REVNUM;
> /* do nothing with peg_rev */
> if (peg_rev == INVALIV_REVNUM)
>
> Which is obviously bogus so I praised the file at various revisions
> until I found the cause. I don't know more than that :)
>
> But I agree our tests should have caught this if it is important.

I'm fine with letting tools (compilers and static analysis) catch this
sort of stuff. Though if there was a library-consumer-layer-visible bug
here, agree that our tests might want to be extended too.
Received on 2011-06-23 01:22:09 CEST

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.