Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91647 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14262 invoked from network); 13 Mar 2016 05:09:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Mar 2016 05:09:21 -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 74.125.82.42 as permitted sender) X-PHP-List-Original-Sender: dz@heroku.com X-Host-Fingerprint: 74.125.82.42 mail-wm0-f42.google.com Received: from [74.125.82.42] ([74.125.82.42:33301] helo=mail-wm0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A9/2C-14237-FF5F4E65 for ; Sun, 13 Mar 2016 00:09:20 -0500 Received: by mail-wm0-f42.google.com with SMTP id l68so63402262wml.0 for ; Sat, 12 Mar 2016 21:09:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heroku-com.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=zC07kdKo4VZp8j5C7Kj3bo90RXHMOyn3VFiXOPkg+oI=; b=Y4Kih9ZEaf+vV1jyVwOgUD3Kh3X6cnvwkX+FeZshy5qSL3sr7NMZRIOEgvyuqLLJ5y LXVouP1B2DERKrn30MgZwVWwjRiJkE4FPWxbx16+ZZLv4YYvz8/+oSu52fCYvAqXP4yc my8Sbsdp+WaGTcRKzZv28ZfaPCFXhicWnMPMviZXzMSOF+4ihrwkmjuAsJaGY3D9gMgU YiNoQXjn8LaBr1sJNkbTkYzpo9YNDe2oYaA7UpPm7o6t7fr7d/R9mlYW+NlD9xJyAuf/ c8fvfOPgMYbPV3zHHDRB/z51X90yHuIGD7WpwwusEFJD3W7IQt0RbmErUzgHEhBM3TH8 +huw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=zC07kdKo4VZp8j5C7Kj3bo90RXHMOyn3VFiXOPkg+oI=; b=bEA5eJP6d8iQXmvCpGLM1BQ8GWYwbz2ulc8VzG1793q3Vvtv6l/U2f7czhHWs4McvP tirvt/DIFLr+jkwzRLJihTT8ApfPWkpdhP26O7jlJsUOwmS1u/meAEuHiGu9mw3pPP/L i7saV/gcSZyPiWQxJ7HfI22Epvxv3qnYhftyKXIVdKIYk+N1sWYposZfEuP2p3lkzZ/G SOZitEaVsA0TFF2nAMafu7fIXTxOHhpWSkzWEMQ8rD7JgECQtotWc7F2jA2aQGFw+nwh ssUbQze5ZNrgnRoGS1+VT4x9yWLop7BXJv1WdHS9RE6k3v6POKF6xGuQq/h7ZzhTvtqB ASVw== X-Gm-Message-State: AD7BkJKKGB6iif8+Fk+VdSkGNkX8qGjQOBaKPSkO+dt6DquXp1/MrqjlvxLP2PiDXaKnw7Jv X-Received: by 10.194.216.40 with SMTP id on8mr19224328wjc.40.1457845756138; Sat, 12 Mar 2016 21:09:16 -0800 (PST) Received: from [192.168.19.20] (ipb21b5588.dynamic.kabel-deutschland.de. [178.27.85.136]) by smtp.gmail.com with ESMTPSA id 202sm9940696wmo.7.2016.03.12.21.09.14 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 12 Mar 2016 21:09:15 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) In-Reply-To: <068e01d0cefb$6ffba3e0$4ff2eba0$@belski.net> Date: Sun, 13 Mar 2016 06:09:14 +0100 Cc: Christoph Becker , Pierre Joye , PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <55B0CADD.8000807@gmx.de> <55B136BE.8010006@gmx.de> <046401d0c644$9cf76880$d6e63980$@belski.net> <55B2B78A.4080202@gmx.de> <048001d0c665$ed19ec40$c74dc4c0$@belski.net> <55B2D779.9090409@gmx.de> <04d301d0c6e5$6b28f0c0$417ad240$@belski.net> <55B3B2E6.7080905@gmx.de> <056e01d0c7d9$b1edd990$15c98cb0$@belski.net> <55B559C7.9060304@gmx.de> <064301d0c85f$5260ac60$f7220520$@belski.net> <55C008B1.2050008@gmx.de> <05ec01d0ce97$4ee7c4e0$ecb74ea0$@belski.net> <55C09EE2.7010400@gmx.de> <063f01d0cec2$91b9baf0$b52d30d0$@belski.net> <55C0F908.2050708@gmx.de> <068e01d0cefb$6ffba3e0$4ff2eba0$@belski.net> To: Anatol Belski X-Mailer: Apple Mail (2.3112) Subject: Re: [PHP-DEV] PCRE JIT stack size limit From: dz@heroku.com (David Zuelke) Just wanted to resurrect this thread... I just got a JIT stack size = limit error (which Composer reports as "unknown error" because it has no = logic for the new constant) while running "composer require somepackage" = with PHP 7 and JIT enabled. IMO, a pattern modifier would be good so that applications can disable = JIT on demand. I'd also like to re-start a discussion on changing the default for = pcre.jit to 0. > On 04.08.2015, at 23:20, Anatol Belski wrote: >=20 > Hi Christoph, >=20 >> -----Original Message----- >> From: Christoph Becker [mailto:cmbecker69@gmx.de] >> Sent: Tuesday, August 4, 2015 7:40 PM >> To: Anatol Belski ; 'Christoph Becker' >> ; 'Pierre Joye' >> Cc: 'PHP internals' >> Subject: Re: [PHP-DEV] PCRE JIT stack size limit >>=20 >> On 04.08.2015 at 16:33, Anatol Belski wrote: >>=20 >>>> -----Original Message----- >>>> From: Christoph Becker [mailto:cmbecker69@gmx.de] >>>> Sent: Tuesday, August 4, 2015 1:16 PM >>>> To: Anatol Belski ; 'Christoph Becker' >>>> ; 'Pierre Joye' >>>> Cc: 'PHP internals' >>>> Subject: Re: [PHP-DEV] PCRE JIT stack size limit >>>>=20 >>>> I didn't mean to store all patterns in both variants, but rather as >>>> requested. Say, the PHP script starts with pcre.jit=3D0, so all >>>> patterns will be stored studied without JIT. Then the script = changes >>>> to pcre.jit=3D1. Following cache lookups check whether an already >>>> cached pattern was studied with JIT. If not, a new cache entry is >>>> made with the pattern studied with JIT (that new entry may replace >>>> the old one or not; not sure what's best). Changing back to >>>> pcre.jit=3D0 will again keep the old patterns, but ensures that = only those which >> have been studied without JIT are retrieved from the cache. >>>>=20 >>> It needs to replace the old entry, the regex string is used as key. = At least per >> current mechanism. When user changes the JIT config, I'd see it like = as an >> obvious hint. Like pcre.jit=3D0 - no more JIT study from now on. >>=20 >> Probably you're right that replacement is best. However, the key is = the full regex >> string (including modifiers), AFAIK, and Adam already came up with = the idea that >> choosing between JIT and non-JIT might be done via a new modifier[1]. >> Something to consider, if it turns out that there is some real = optimization >> potential for userland to choose between both variants on a = case-by-case basis. >>=20 > Yeah, that were a nice approach. Should be checked probably, whether = there's a corresponding perl pattern modifier (probably there is none, = but shouldn't be that bad). And also to evaluate what behavior were = produced when say jit is disabled but a modifier is passed. >=20 >>> Probably it would be needed to save the study flags with the cache = entry, looks >> like the pcre_cache_entry struct should have a gap for that. >>=20 >> If I'm not mistaken, an additional flag wouldn't be necessary, = because the >> pcre_extra struct has the executable_jit field, which could be = queried. >>=20 > Ok, that would be even better, given it's reliable. >=20 > Regards >=20 > Anatol >=20 >=20 > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php