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

Re: Reuse of ra_dav sessions considered harmful

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2006-01-05 00:58:28 CET

On 1/4/06, Philip Martin <philip@codematters.co.uk> wrote:
> Garrett Rooney <rooneg@electricjellyfish.net> writes:
>
> > because svn_ra_dav__get_commit_editor uses ne_hook_create_request and
> > ne_hook_pre_send to create two hooks, which use batons allocated out
> > of the subpool. These hooks never go away (and in fact I can't find
> > any API that even lets you make them go away in the current version of
> > neon), so the next time through the loop you try to call them again,
> > except that the baton is now pointing off into memory that's been
> > reused, and you crash.
>
> I've seen something like that before, see setup_neon_request_hook and
> r14295. Perhaps you could use a similar approach?

That seems like about the best we can do with the current APIs. One
thing that occurs to me about the way the lock code is doing this
though, perhaps it should be setting lrb->pool to the current pool, as
opposed to the session pool, so as to avoid leaking memory inside the
hook callbacks.

Thanks for the pointer!

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jan 5 00:59:53 2006

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.