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

 ID:                 39349
 Comment by:         ni...@php.net
 Reported by:        nikolas dot hagelstein at gmail dot com
 Summary:            Core dump on preg_replace
 Status:             Not a bug
 Type:               Bug
 Package:            PCRE related
 Operating System:   Netbsd 3.0.1
 PHP Version:        5.2.0
 Assigned To:        andrei
 Block user comment: N
 Private report:     N

 New Comment:

@tsteiner: I'm pretty sure that this option was considered, but was found to 
carry a performance penalty. Would be nice to get some data on this.


Previous Comments:
------------------------------------------------------------------------
[2013-05-08 20:36:54] tsteiner at nerdclub dot net

I've uploaded a patch that will disable using the stack for recursion when 
building PCRE with the included library source.  I've found that this 
completely 
eliminates segfaults when using PCRE functions on long strings.

------------------------------------------------------------------------
[2006-12-01 21:37:36] nikolas dot hagelstein at gmail dot com

A stack overflow shouldnt cause a segfault.

------------------------------------------------------------------------
[2006-12-01 20:25:11] nlop...@php.net

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] tony2...@php.net

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.

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


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

    https://bugs.php.net/bug.php?id=39349


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

Reply via email to