Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66200 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56025 invoked from network); 25 Feb 2013 16:44:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Feb 2013 16:44:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:53004] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5F/3D-10787-4059B215 for ; Mon, 25 Feb 2013 11:44:53 -0500 Received: from [192.168.2.20] (ppp-88-217-65-93.dynamic.mnet-online.de [88.217.65.93]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id C6AF665DE5; Mon, 25 Feb 2013 17:44:49 +0100 (CET) To: Bob Weinand Cc: PHP List Developers Mailing In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Mon, 25 Feb 2013 17:45:38 +0100 Message-ID: <1361810738.2376.74.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] About restricting the recursive implicit calls From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Mon, 2013-02-25 at 16:36 +0100, Bob Weinand wrote: > p.s.: There is no reason why not to fix this in this way, I think, as > you can test at how may iterations the stack will overflow and set the > limit near to this maximum. Which is exactly what we have already > today, only without possible crashes. For one the stack frames aren't always the same size on all nesting levels, depending on what's exactly happening. There have neen different discussions about this in the past. One I could finde first was Vote for Zend Deep Stack Prevention (ZDSP) http://news.php.net/php.internals/22011 In general reasons for not doing that were that we'd have a hard time setting a good default for an counter-based approach, whereas an approach checking the actual stack size would be too expensive. I however agree that with recent engine improvements, where infinite recursion is harder to get one might rethink that. A name using "magic" sounds inappropriate, though in any case. :-) johannes