Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22718 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32026 invoked by uid 1010); 11 Apr 2006 19:23:16 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 32011 invoked from network); 11 Apr 2006 19:23:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Apr 2006 19:23:16 -0000 X-Host-Fingerprint: 204.11.219.139 lerdorf.com Linux 2.5 (sometimes 2.4) (4) Received: from ([204.11.219.139:47624] helo=lerdorf.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id EA/CF-19715-4220C344 for ; Tue, 11 Apr 2006 15:23:16 -0400 Received: from [66.228.175.145] (borndress-lm.corp.yahoo.com [66.228.175.145]) (authenticated bits=0) by lerdorf.com (8.13.6/8.13.6/Debian-1) with ESMTP id k3BJNBt6013233; Tue, 11 Apr 2006 12:23:12 -0700 In-Reply-To: <004901c65d98$fb02ba70$0100a8c0@pc07653> References: <43e2d0beeea44b0a7a5ab9a0fefc5fb5@gravitonic.com> <004901c65d98$fb02ba70$0100a8c0@pc07653> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-ID: Content-Transfer-Encoding: 7bit Cc: "PHP Internals" , "Ilia Alshanetsky" Date: Tue, 11 Apr 2006 12:25:29 -0700 To: "Nuno Lopes" X-Mailer: Apple Mail (2.623) Subject: Re: [PHP-DEV] PCRE error handling patch From: andrei@gravitonic.com (Andrei Zmievski) It's hard to pick a default that will work for everyone. I can probably see setting recursion limit somewhat lower than backtracking one, though. Maybe 100,000/50,000 or something like that. -Andrei On Apr 11, 2006, at 11:51 AM, Nuno Lopes wrote: > I would say that 100.000 recursions is too much. When I made my patch > it was segfaulting with such value. 50.000 is a much safer choice (at > least on my gentoo box, 8 MB of stack). > > Nuno > > > ----- Original Message ----- >> I made a patch (against HEAD currently only) that makes it possible >> to set runtime limits on backtracking and recursion. It also >> implements preg_last_error() that lets users check whether there was >> an execution error (such as limit exceeded or bad UTF-8 or whatever). >> >> Ilia, do you think it might make it into 5.1.3? >> >> http://www.php.net/~andrei/pcre.diff >> >> -Andrei >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php