Hi,
The problem is that setrlimit() need privilege to expand the process stack.
I don't think it's a good idea to use this system call to fix the too-high-function-stack bug.
There is no really way to fix correctly this bug.
However I think we should re-examined the execution flow of PECL functions.
It is not normal PECL can eat all the stack.
-michael
----- Original Message ----- From: "Wez Furlong" <[email protected]>
To: "Ilia Alshanetsky" <[email protected]>
Cc: "Nuno Lopes" <[email protected]>; "PHPdev" <[email protected]>
Sent: Thursday, February 23, 2006 5:29 AM
Subject: Re: [PHP-DEV] recover from a segfault
If we do do this, please make it optional; it's bad form when a module
or a library unilaterally changes a process-wide option or setting and
impacts a system that has already been tuned; the sysadmin may already
have set up appropriate limits.
--Wez.
On 2/21/06, Ilia Alshanetsky <[email protected]> wrote:
Nuno Lopes wrote:
PCRE can consume a lot of stack, because of backtracking (thus
segfaulting PHP). Yesterday I've discovered that when using the
setrlimit() function, most segfaults can be avoided
(http://mega.ist.utl.pt/~ncpl/php_pcre_stack_limits.txt) :)
This sounds like an interesting idea, I think we need to consider it
doing for PHP in general rather then jut when PCRE is being used. The
only thing is that rather then setting the stack to infinity, perhaps a
small value can be used ;-)
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php