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

Re: Code review requested.

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2005-03-03 18:30:03 CET

Philip Martin <philip@codematters.co.uk> writes:

> "C. Michael Pilato" <cmpilato@collab.net> writes:
>
> > Well, I don't have time to diagnose the problem right now (and it
> > wasn't obvious to me what's wrong). So I'll just revert the change
> > and figure it out later (unless someone else beats me to it).
>
> Here's my analysis:
>
> - fs-test.c calls svn_fs_base__dag_get_node passing an iteration
> subpool.
>
> - svn_fs_base__dag_get_node allocates a new dag_node_t and calls
> get_node_revision passing the node.
>
> - get_node_revision calls cache_node_revision which uses
> svn_fs_base__record_completion to register uncache_node_revision and
> the node with the trail.
>
> - Sometime after svn_fs_base__dag_get_node returns the iteration
> subpool gets cleared and the allocated node becomes invalid, but
> uncache_node_revision and the, now invalid, node remain registered
> with the trail.
>
> - When the trail finally calls uncache_node_revision the invalid node
> is accessed.
>
> The new pool argument to svn_fs_base__dag_get_node allows nodes to get
> allocated that may not last as long the trail. If that is the
> intended behaviour then I suppose a pool cleanup function is required
> to cooperate with the node cache, but I'll leave the fix for someone
> else as I don't know the code well enough.

Well, it's great to know that the part of this change I deliberated on
for the longest time (the stupid node_revision_t caching, which I
tweaked, retried, re-tweaked ... I dunno, 4 or 5 iterations) was the
part that fell over. :-)

Thanks for the analysis, Philip.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Mar 3 18:33:21 2005

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.