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

Re: [TSVN] Changes in 2634

From: SteveKing <stefankueng_at_gmail.com>
Date: 2005-02-08 11:25:03 CET

On Tue, 08 Feb 2005 10:12:58 +0000, Will Dean <svn@indcomp.co.uk> wrote:

> I'm not overjoyed about some of the changes in 2634, particularly the
> wrapping of code in SVNFolderStatus in a catch(...) block.
>
> The response from the cache (after the pointer fix-up which occurs in
> RemoteCacheLink) should be consistent, and shouldn't have broken data in it.

As you say: _shoud_ be consistent! But you can't be sure here. And I'd
rather have a catch block around such code than have the shell crash.
Also, you must consider the data coming from another application than
our own (e.g. a 'bad' program trying to do some nasty things).

> If we feel we need to be defensive about data coming in from the cache (I
> don't think we do, actually), then I think we should validate it in
> RemoteCacheLink, and not just munge around it with catch(...) blocks in the
> code which uses the data.

That may be better, yes.

> Have you been getting shell crash reports related to the new cache which
> were tracked-down to bad data being delivered to this bit of code?

No. I just did a little review and found almost no checks.
What worried me most was in StatusCacheEntry.cpp::BuildCacheResponse()
returned invalid pointers and non-terminated strings (not zero
terminated) if m_bSVNEntryFieldSet was FALSE. That's when I decided to
add the try-catch block - there might be more of those lying around.

> I haven't changed anything in SVNFolderStatus, but I would like to register
> a -10 vote on this. (Do I need 9 sock-puppets to register a -10?)

There's only -1, 0, and +1.

> Anyway, I'm shortly going to commit some significant changes to the cache,
> so it's probably best not to change anything else in there for the moment...

Ok.

Stefan

-- 
       ___
  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
   /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Tue Feb 8 11:25:58 2005

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

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