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

Re: [PATCH] ISSUE #3193 Fix peg revision parsing for CLI repository root relative urls.

From: Troy Curtis Jr <troycurtisjr_at_gmail.com>
Date: Tue, 27 May 2008 10:14:12 -0500

On Tue, May 27, 2008 at 8:57 AM, Karl Fogel <kfogel_at_red-bean.com> wrote:
> Folker Schamel <schamel23_at_spinor.com> writes:
>>>>> No need to strdup "" into a pool. Just assign "" directly; the static
>>>>> storage won't hurt anyone, will it?
>>>> Ok, I'm still trying to get used to all this pool based things. The
>>>> static storage is OK here because the string is never explicitly freed
>>>> by the caller, just the pool is freed at some point in the future. Do
>>>> I understand that correctly?
>>> Since "" is a constant, it almost certainly will be compiled as a
>>> pointer to a fixed copy of the empty string in the program's text: no
>>> dynamic allocation or freeing involved at all.
>> Is it possible that the DLL containing the code is unloaded
>> before the pool is destroyed?
> ?
> I'm not sure I understand this question, but to the extent that I do
> understand it, I think you might think something that isn't true.
> There is no "the pool" as far as that empty string is concerned. It's
> not allocated in a pool. Troy just meant that some other pool might be
> cleared or destroyed, and that this wouldn't affect the statically
> allocated (and probably shared) empty string.
> -Karl

I interpret his question as this: Is it possible that the pool the
returned array is in can be destroyed sometime after the dll
containing the static string is unloaded, and that a caller might try
to access the static string location after the dll is unloaded but
before the pool is destroyed.

I still think the answer is likely that it doesn't matter, but I don't
know the details of the subversion dll loading/unloading procedures.


"Beware of spyware. If you can, use the Firefox browser." - USA Today
Download now at http://getfirefox.com
Registered Linux User #354814 ( http://counter.li.org/)
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-05-27 17:14:28 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.