On Sunday, September 15, 2002, at 10:51 PM, Garrett Rooney wrote:
> here's what i've currently got. the patch has two known issues.
> first, for some reason if i use a subpool of the main pool as the
> cancelation pool, we segfault trying to allocate the cancelation
> error. i have no clue why this is happening. if someone could shed
> some light on the problem, i would appreciate it.
just figured this one out. when the top level pool is destroyed, all
the cleanup functions get called, some of which use SVN_ERR. since
we're in a state where the cancelation function is returning true, this
causes a SVN_ERR_CANCELED error to be allocated. if the cancelation
pool is not the last to go (which it isn't), then we crash.
the current patch i've got sets up a cleanup function that unregisters
the cancelation function when the cancelation pool is destroyed (which
makes sense, since the cancelation function is pretty useless without a
pool to allocate errors from). i'm not sure about the thread safety
aspects of this though. my current thoughts are that any time that
pool is destroyed while another thread is using svn functions it's an
application bug, so we shouldn't go out of our way to make it work.
> second, there's one place (that i noticed) where svn_error_clear_all
> is used in a function which does not return an svn_error_t *, so we
> seem to be stuck not having cancelation supported from there. i guess
> as long as this doesn't happen often, it's ok, but i still don't like
i've concluded that this is just something we have to live with.
other than that, i'm about ready to commit. it'd be nice to rework the
svn_error_clear_all function to incorporate function and line numbers
like the other error code does, but that can come in a second commit
down the line.
here's the current patch i'm working on, as always i'd appreciate any
garrett rooney Remember, any design flaw you're
email@example.com sufficiently snide about becomes
http://electricjellyfish.net/ a feature. -- Dan Sugalski
Received on Tue Sep 17 04:33:59 2002
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com