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

Re: [PATCH] adm_files.c:adm_subdir()

From: Greg Stein <gstein_at_lyra.org>
Date: 2000-09-11 12:45:04 CEST

On Mon, Sep 11, 2000 at 11:21:21AM +0100, Joe Orton wrote:
> Is this function safe?

Nope.

I just did a search over the libraries and found a second non-const global
variable (svn_delta__tagmap). That was used as "const", so I just checked in
a change to truly make it that way.

Basic rule: global mutable variables in SVN, anywhere and for whatever
purpose, are always a bad sign and invariably need to change.

> As I read it, it allocates a string in a pool,
> but expects it to last for the lifetime of the process.
>
> Could do something complex and not very efficient with
> apr_set/get_userdata, but maybe something simpler is okay for the time
> being:

I agree. I've applied your patch (plus a bit). Karl may have different ideas
on what to do here, but he can add more tweaks as needed.

thx!
-g

-- 
Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:08 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.