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

Re: Is svn_config_get() not thread-safe?

From: Branko Čibej <brane_at_xbc.nu>
Date: Thu, 03 Apr 2008 00:47:04 +0200

Karl Fogel wrote:
> "David Glasser" <glasser_at_davidglasser.net> writes:
>
>>> The implementation bears out the doc string's claim. (See the code
>>> below, with notes from me marked with "###".) But this is bogosity:
>>> another thread could call svn_config_get() and wipe out *valuep before
>>> the first caller ever has a chance to "consume" (e.g., copy) the value.
>>>
>> Well, specifically it's "the next call to svn_config_get() with the
>> same svn_config_t". Does that make it any better?
>>
>
> Well, the doc string should state that too, but no, it doesn't nmake the
> problem go away. It remains the case that there is no thread-safe way
> to extract a value -- two different threads could have the same config
> object, there's no rule against that (nor should there be).
>

Yes there should be. We've been extremely lax in specifying our thread
isolation level, except for stating that our API is "thread-safe". AFAIK
we explicitly state that two threads can't use the same top-level APR
pool at the same time to call our APIs. An svn_config_t is "just" a
wrapper for a pool in this respect.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-04-03 00:47:41 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.