Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87270 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87788 invoked from network); 24 Jul 2015 12:32:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jul 2015 12:32:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=dz@heroku.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dz@heroku.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain heroku.com designates 209.85.212.176 as permitted sender) X-PHP-List-Original-Sender: dz@heroku.com X-Host-Fingerprint: 209.85.212.176 mail-wi0-f176.google.com Received: from [209.85.212.176] ([209.85.212.176:34244] helo=mail-wi0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A2/54-57278-D4032B55 for ; Fri, 24 Jul 2015 08:32:14 -0400 Received: by wibud3 with SMTP id ud3so63494592wib.1 for ; Fri, 24 Jul 2015 05:32:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=mG+/2dhxFK2PTKEUucvUSMxGxXJWbXBGuLKgEGAiPQo=; b=hn4dU+AtFd/5xCut9h9KpeNWiUZ4ZWJYxutoNTosXlXsGaTz6VBGc8UTvdNp7lalVZ KIgmR96/jxIk23raXAa6PI5Dxw6vEC5aHcvTpgDijkoupXbuhYzpq5s2tKWDh3BDh78R RRdDayo5buVo5TWHQycgYalrYCNdsfpW+Cy6DfnOkQxIDjdEBXJ+rMznmZqvebwqP0Ff nyqpJQNCqJ7CUz7FuiJMu3DvBoLQ/cgAbDx2lxiTA5uP/AK0a72Eni8s4lVMcSWnXbil 1ag57CFeQ7zZc/bSBpwSZ0UVTzX7NDVbpWblaXnRsqfex9KFtSFk252nRSRV4A9Ta+O2 4fUQ== X-Gm-Message-State: ALoCoQn4DAaXUx/2Wa6Vtt0H71rY2c4XqKDc+21w7ajtPBoV83IMPPk/6aY+QrkoyWeB36fikxka X-Received: by 10.180.105.165 with SMTP id gn5mr6647230wib.20.1437741130357; Fri, 24 Jul 2015 05:32:10 -0700 (PDT) Received: from [192.168.19.20] (ipbcc0d8c7.dynamic.kabel-deutschland.de. [188.192.216.199]) by smtp.gmail.com with ESMTPSA id hd6sm3313627wib.19.2015.07.24.05.32.09 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 24 Jul 2015 05:32:09 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) In-Reply-To: Date: Fri, 24 Jul 2015 14:32:21 +0200 Cc: Christoph Becker , PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <787E3411-1213-44C0-809D-D1D8CA89277A@heroku.com> References: <55B0CADD.8000807@gmx.de> <55B136BE.8010006@gmx.de> To: Adam Harvey X-Mailer: Apple Mail (2.2102) Subject: Re: [PHP-DEV] PCRE JIT stack size limit From: dz@heroku.com (David Zuelke) On 24.07.2015, at 09:33, Adam Harvey wrote: >=20 > On 23 July 2015 at 11:47, Christoph Becker wrote: > >> Therefore I tend to prefer a new ini setting (say, = pcre.jitstack_limit). >> That would mean, however, to add yet another ini setting, of which >> there are already so many. >=20 > I'm not a big fan of that, although it's at least in the spirit of > what configuration settings are meant to be used for. >=20 > What if we added the PCRE_ERROR_JIT_STACKLIMIT error constant to those > exposed to userland so that it's more easily noticed via > preg_last_error(), and adding a modifier that can be used to disable > the JIT on a per-pattern basis (by setting PCRE_NO_START_OPTIMIZE, > which admittedly disables other stuff too, but at least the regex will > run)? At least then users could check the error when the regex fails > and re-run the regex without the JIT if they chose to. But this might mean that patterns which previously worked, because no = JIT was used, suddenly fail in existing code with a new error constant. = Which I guess is a BC break.