[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: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-03-03 02:47:29 CET

"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.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Mar 3 02:48:44 2005

This is an archived mail posted to the Subversion Dev mailing list.