ID:               39349
 User updated by:  nikolas dot hagelstein at gmail dot com
 Reported By:      nikolas dot hagelstein at gmail dot com
 Status:           Bogus
 Bug Type:         PCRE related
 Operating System: Netbsd 3.0.1
 PHP Version:      5.2.0
 Assigned To:      andrei
 New Comment:

A stack overflow shouldnt cause a segfault.


Previous Comments:
------------------------------------------------------------------------

[2006-12-01 20:25:11] [EMAIL PROTECTED]

no bug here. just a stack overflow, which is avoidable by tweaking the
new ini options and/or increasing the stack size.

------------------------------------------------------------------------

[2006-11-12 19:03:04] [EMAIL PROTECTED]

Yes, endless recursion most likely results in a segfault and this is
expected.

------------------------------------------------------------------------

[2006-11-12 15:15:26] nikolas dot hagelstein at gmail dot com

This seems to be stack overflow related in general:
<?php

class Foo {
        function do_something() {
                global $x,$i;           
                $i++;
                echo $i."\n";
                $x->do_something();             
        }
}
$i=0;
$x = new Foo();
$x ->do_something();
?>

Endless recursion results in stack overflow which throws a segmentation
fault. Probably libc os related.

------------------------------------------------------------------------

[2006-11-08 20:44:14] nikolas dot hagelstein at gmail dot com

seems to work with ulimit is there any other solution beside
recompiling it using the named flag? i mean running out of stack may
happen on any system regardless of its default ulimits.

------------------------------------------------------------------------

[2006-11-07 14:48:39] [EMAIL PROTECTED]

You probably run out of stack.

You can try increasing your stack size and trying again on the command
line with:

uname -s 16384

for example. If that's what your problem is you can compile an external
PCRE that will not use stack but heap (and be slower in the process).
You can do that by compiling PCRE using --disable-stack-for-recursion
option.


------------------------------------------------------------------------

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/39349

-- 
Edit this bug report at http://bugs.php.net/?id=39349&edit=1

Reply via email to