Re: svn commit: r1138516 - /subversion/trunk/subversion/libsvn_client/ra.c
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