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

Re: blame can access NULL-pointer

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Wed, 02 Jul 2008 17:46:24 +0100

On Wed, 2008-07-02 at 18:40 +0200, Stefan Küng wrote:
> Julian Foad wrote:
> > On Wed, 2008-07-02 at 18:26 +0200, Arfrever Frehtes Taifersar Arahesis
> > wrote:
> >> 2008-07-02 18:19:45 Stefan Küng napisa³(a):
> >>> Hi,
> >>>
> >>> In file subversion\libsvn_client\blame.c, line 684 there is an assert:
> >>>
> >>> /* The callback has to have been called at least once. */
> >>> assert(frb.last_filename != NULL);
> >>>
> >>> I just got a crash report for TSVN where this assert is being hit: the
> >>> user passed a revision range which didn't touch the file to blame. So
> >>> the callback was never hit.
> >>>
> >>> I suggest returning an error there, something like "nothing to blame for
> >>> the specified revision range".
> >> Julian Foad fixed it in r31972.
> >
> > No I didn't. I just converted all "assert" macros into "SVN_ERR_ASSERT"
> > macros, which does provide the application with the option of returning
> > an error object to report the assertion failure instead of aborting, but
> > doesn't make it right that this supposedly "can't happen" condition in
> > fact can happen.
>
> I guess that new macro won't get into 1.5.x?

I'd say not.

> If not, then I would still recommend to return an error there and
> backport that fix to 1.5.x. After all, it *can* happen.

Certainly. But can you help me see how it can happen? My initial attempt
to reproduce this with the command-line client just shows the expected
result: "-" for the revision and author of each line:

> $ bin/svn blame -r31000:31001 HACKING
> - - This document has been moved to www/hacking.html (which is online at
> - - http://subversion.tigris.org/hacking.html).

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-07-02 18:46:55 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.