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

Re: 1.3.1 tarballs up for testing/signing (Again)

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2006-03-30 00:42:55 CEST

Malcolm Rowe <malcolm-svn-dev@farside.org.uk> writes:

> On Wed, Mar 29, 2006 at 05:54:29PM +0100, Philip Martin wrote:
>> Yes, that's it. Obviously the test intended to pass subpool here, and
>> passing subpool does fix the problem, but does that indicate a bug in
>> the editor code? Does passing the parent pool violate the editor API?
>
> It doesn't violate the editor API per se, I'm fairly sure, since the
> pools are all valid throughout the lifetime of editor use (I think).
> But it might violate an assumption of the implementation.

When commit_editor_authz is run it calls svn_test__create_repos (at
repos-test.c:1371) and passes the subpool. That causes the DSOs to
get loaded and to have a lifetime linked to the subpool. Later the
test calls editor->open_directory (at repos-test.c:1495) and passes
pool, which is the parent of subpool. This causes callbacks to get
registered on pool and the callback addresses are functions within the
DSO. Once the test is complete subpool gets destroyed first and this
unloads the DSO. Now the callbacks on pool point to functions that
are no longer part of the executable, and when pool is destroyed we
get a SEGV since the function addresses are invalid. Nasty!

I suppose we could simply say "don't do that", but it gets tricky to
define precisely what constitutes "that". Ideally we would unregister
the callbacks when the DSO is unloaded, but that's tricky.

-- 
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 30 00:43:10 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.