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

Re: [PATCH] RA sessions should always be loaded from the same pool (was Re: Crash of svn-1.2.x in svn_ra_open())

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2005-07-27 19:23:14 CEST

On Wed, 2005-07-27 at 17:34 +0100, Nix wrote:
> The cause of this is that a key in the auth_baton hash has been
> invalidated and points at a no-longer-valid address. How, you might ask,
> since all the keys are manifest constants?

Perhaps we should stop using a manifest constant, then. We've certainly
chosen to allocate memory in a passed-in pool rather than use a manifest
constant in some past situations, for just this reason.

Can you say more about where these constants are coming from?

> So as a possibly more maintainable alternative, the hack below fixes
> apr_dso_load() callers to always use tiny dedicated pools which are
> never deallocated.

Your patch isn't very thread-safe. We could use svn_ra_initialize() to
set up the dedicated pool and a mutex protecting it, but because we
introduced svn_ra_initialize() in 1.2, we can't require every client to
call it.

More importantly, it should be possible to dynamically load the
Subversion client library and then unload it without leaving big
footprints behind. So, we should get our memory management story right,
rather than applying a big hammer to the DSO system.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 27 19:24:31 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.