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

Re: Recursion of copy_source_ops() causes stack overflow in Apache

From: Daniel Berlin <dberlin_at_dberlin.org>
Date: 2007-01-29 19:12:38 CET

On 1/26/07, Malcolm Rowe <malcolm-svn-dev@farside.org.uk> wrote:
> On Fri, Jan 26, 2007 at 03:01:46AM -0800, Robin Boerdijk wrote:
> > Someone on the #svn-dev IRC channel thought that the deep recursive
> > behaviour of copy_source_ops() was perhaps exceptional but not a bug.
> > But what I'm afraid of is that copy_source_ops() does not have a
> > theoretically maximum recursion depth.
> >
>
> From what I understand, delta combining is an O(N^2) operation by
> definition, and so it's certainly possible that some of that is reflected
> in the recursion depth of copy_source_ops().

Only if you consider target ops :)
> But if that was the case,
> I would have expected that we'd have noticed it somewhere else as well -
> either from user reports or possibly in one of the larger repositories
> like gcc's.

I disabled vdelta as fast as i could, remember.
>
> [Oh, there definitely should be a hard maximum recursion depth for
> copy_source_ops(), though I don't know what it is, and it might be quite
> large. The operation definitely isn't unbounded.]

Errr, why not just remove the c-stack and turn the thing into a while
loop using a pool-allocated stack?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jan 29 19:13:00 2007

This is an archived mail posted to the Subversion Dev mailing list.