#41165 [Opn]: Segmentation fault in single script
| From: | JimmyPaterson at gmx dot de | Date: | Thu, 03 May 2007 22:54:54 +0000 |
| Subject: | #41165 [Opn]: Segmentation fault in single script | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-112216@lists.php.net to get a copy of this message | ||
ID: 41165
User updated by: JimmyPaterson at gmx dot de
Reported By: JimmyPaterson at gmx dot de
Status: Open
Bug Type: Reproducible crash
Operating System: Fedora Core 6
PHP Version: 5CVS-2007-04-22 (snap)
New Comment:
Oh, sorry about that - this time I've uploaded it as a downloadable
file on my own webspace:
http://mhooo.mirrormoon.org/dload/template.bugged.class.inc.php
(don't
mind the .php extension, it won't execute but download instead).
Previous Comments:
------------------------------------------------------------------------
[2007-05-03 17:54:02] andrei@php.net
I can't download the reproduction code from that link.
------------------------------------------------------------------------
[2007-04-23 18:54:55] JimmyPaterson at gmx dot de
My code however does the same thing example 1662 on
http://de2.php.net/manual/en/function.preg-replace-callback.php
does. So
is that an infinite recursion as well? Why is there an example to
infinite recursion if the actual depth of recursion is limited (to
whatever depth) and why is there no notice on that matter :?x
thanks for helping,
joreji
------------------------------------------------------------------------
[2007-04-23 16:22:58] tony2001@php.net
>Why is it expected to cause a stack overflow?
Why infinite loop is expected to cause stack overflow?
Because that's how stack works.
>It is not infinite after all
PCRE itself uses stack pretty hard.
And it is infinite, yes.
------------------------------------------------------------------------
[2007-04-23 16:08:54] JimmyPaterson at gmx dot de
Why is it expected to cause a stack overflow?
It is not infinite after all - I could "expect" a stack overflow with a
hundred of recursive calls to preg_match_callback, but not with only 4 -
at least not with memory_limit being 128MB.
------------------------------------------------------------------------
[2007-04-23 10:26:44] tony2001@php.net
Infinite recursion - preg_replace_callback -> callback ->
preg_replace_callback is expected to cause stack overflow.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/41165
--
Edit this bug report at http://bugs.php.net/?id=41165&edit=1