Re: [xslt] Segmentation fault with an infinite loop
- From: Morus Walter <morus walter tanto de>
- To: The Gnome XSLT library mailing-list <xslt gnome org>
- Subject: Re: [xslt] Segmentation fault with an infinite loop
- Date: Thu, 8 Jul 2004 09:43:51 +0200
Hi,
>
> I certainly don't see anything wrong with your settings. However, I
> am still convinced that my analysis is correct - the problem you
> reported occurs because of the amount of stack which your process
> has available to it.
>
> If you want to further convince yourself, you can play around with
> xsltproc under the debugger. A couple of important points: the
> detection and forced termination of excessive recursion is
> controlled by the global variable xsltMaxDepth (defined at
> transform.c:66, where it is preset to 5000 [number of stored
> templates]). You can try (under the debugger) setting it to a lower
> value to see that the detection process properly occurs. Then, the
> comparison of the current template stack level (which is kept at
> ctxt->templNr) with this constant happens at templates.c:1484. You
> can put a break on this statement and see that all proceeds well up
> to whatever level your stack setting allows (I only know from your
> description that this number is < 5000 :-).
>
You don't need the debugger, there's a --maxdepth option in xsltproc.
I find (debian woody, kernel 2.4.21; xsltproc 1.0.33, libxml 2.5.11) that
the detection works up to a depth of ~4400 and fails for deeper (>4500)
recursion.
Changing the stacksize (8192k in my case) to 10240k doesn't change this.
Changing the stacksize down to 4096k doesn't change it either.
So I don't understand what's going on there.
But I agree with William that this doesn't seem to be a libxslt issue.
Morus
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]