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