You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2008/08/19 13:19:34 UTC

Re: svn commit: r32545 - in trunk/subversion: libsvn_fs_base libsvn_fs_fs

On Tue, Aug 19, 2008 at 5:55 AM,  <cm...@tigris.org> wrote:
>...
> +++ trunk/subversion/libsvn_fs_fs/tree.c        Tue Aug 19 05:55:02 2008        (r32545)
> @@ -3077,9 +3077,14 @@ fs_node_origin_rev(svn_revnum_t *revisio
>       {
>         svn_pool_clear(subpool);
>         SVN_ERR(svn_fs_fs__dag_get_node(&node, fs, pred_id, subpool));
> +
> +        /* Why not just fetch the predecessor ID in PREDIDPOOL?
> +           Because this function doesn't necessarily honor the
> +           passed-in pool, and might return a value cached in the node
> +           (which is allocated in SUBPOOL ... maybe). */

Why don't you fix the function to copy the ID if it gets yanked from
the cache? That will fix *all* uses of the function. Not just this
one.

Cheers,
-g

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r32545 - in trunk/subversion: libsvn_fs_base libsvn_fs_fs

Posted by "C. Michael Pilato" <cm...@collab.net>.
Greg Stein wrote:
> On Tue, Aug 19, 2008 at 5:55 AM,  <cm...@tigris.org> wrote:
>> ...
>> +++ trunk/subversion/libsvn_fs_fs/tree.c        Tue Aug 19 05:55:02 2008        (r32545)
>> @@ -3077,9 +3077,14 @@ fs_node_origin_rev(svn_revnum_t *revisio
>>       {
>>         svn_pool_clear(subpool);
>>         SVN_ERR(svn_fs_fs__dag_get_node(&node, fs, pred_id, subpool));
>> +
>> +        /* Why not just fetch the predecessor ID in PREDIDPOOL?
>> +           Because this function doesn't necessarily honor the
>> +           passed-in pool, and might return a value cached in the node
>> +           (which is allocated in SUBPOOL ... maybe). */
> 
> Why don't you fix the function to copy the ID if it gets yanked from
> the cache? That will fix *all* uses of the function. Not just this
> one.

Because a flaw in my personality would cause me to not just fix this one
function, but every other function that is miserable in the same way, which
is an open-ended time suck I can't invest in right now. :-)

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand