Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22001 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7462 invoked by uid 1010); 24 Feb 2006 15:43:35 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 7439 invoked from network); 24 Feb 2006 15:43:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Feb 2006 15:43:35 -0000 X-Host-Fingerprint: 193.252.22.54 smtp13.wanadoo.fr Linux 2.4/2.6 Received: from ([193.252.22.54:1767] helo=smtp13.wanadoo.fr) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 7F/B4-30574-3A92FF34 for ; Fri, 24 Feb 2006 10:43:31 -0500 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf1307.wanadoo.fr (SMTP Server) with ESMTP id 823B97000098 for ; Fri, 24 Feb 2006 16:43:27 +0100 (CET) Received: from binarysecfb111 (AStDenis-102-1-5-150.w81-248.abo.wanadoo.fr [81.248.226.150]) by mwinf1307.wanadoo.fr (SMTP Server) with SMTP id 63B3C700008B; Fri, 24 Feb 2006 16:43:25 +0100 (CET) X-ME-UUID: 20060224154325408.63B3C700008B@mwinf1307.wanadoo.fr Message-ID: <008901c63959$00d74ba0$6600a8c0@binarysecfb111> To: "Wez Furlong" , "Ilia Alshanetsky" Cc: "Nuno Lopes" , "PHPdev" References: <005101c6373a$a6ef0170$0100a8c0@pc07653><43FB9D99.5070302@prohost.org> <4e89b4260602222029s454a0075jbdeadd1ec4b8372b@mail.gmail.com> Date: Fri, 24 Feb 2006 16:43:02 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Subject: Re: [PHP-DEV] recover from a segfault From: mv-php@binarysec.com ("Michael Vergoz") 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" To: "Ilia Alshanetsky" Cc: "Nuno Lopes" ; "PHPdev" 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 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