Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87597 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31671 invoked from network); 4 Aug 2015 11:15:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Aug 2015 11:15:51 -0000 Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.15.18 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.15.18 mout.gmx.net Received: from [212.227.15.18] ([212.227.15.18:62504] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1F/B0-24673-5EE90C55 for ; Tue, 04 Aug 2015 07:15:50 -0400 Received: from [192.168.0.100] ([95.89.139.132]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MHHdb-1ZacgU2DGl-00E3qA; Tue, 04 Aug 2015 13:15:45 +0200 Message-ID: <55C09EE2.7010400@gmx.de> Date: Tue, 04 Aug 2015 13:15:46 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Anatol Belski , 'Christoph Becker' , 'Pierre Joye' CC: 'PHP internals' 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> In-Reply-To: <05ec01d0ce97$4ee7c4e0$ecb74ea0$@belski.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:Dl5Nk6QlWqh29mXn/kLty5gkqzXbUS5el6SXjm++a0yj8RcShNU 4RkaTEj0YFdBuLGAYDM+Wl57QKeiWfBaL7EzoOWdF0no54HND+HriQxymgToh+5GvPV28Aq l8LoMnJzzCEJR0pklp9cxoFQaufHzmJj0NTDGqSCwiM+sLbuULdMNp8//dYWs3q8ZwFIWxp 6NNqdLDaPCvWMmMaw9J8Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:5ybqLeIkMCk=:eDUPSq6q2JYio1ZcHQ+NiK maDiW1vLFv463nrrzS+fcxBzYrSmdpdPqmcyaIbbbvrvfJWJYP586/h60HGYe/JWUhG6c0Kgc rqK+VWSnzBmgI5d1Yc+6/mHOd5aSfKVFsmPa/K2IOyql65E+0FJv6Hww+m7KdWshkdOk4Gu95 R7tXRUoehxxgBOHxmH9CDDh/YaOWuHRUYPu5x7nc4rDmrDrIbjk2Z2rxzvnxTe9+ikkmPCNVT HLm/UoCkJzgtT85O2zsnuVDbni0adjyIczBFLQly9+JeOuUGRJRbnaYIcDA/sYMa8tnAR0jJt lbk+19etYMBsa78vQiQvQ4AtDwjoTEnonTXaYj4dBX55kf6UsiE91G2AmzyFMAhjOTwZIW3ck BkwCMns4ClMlHAxkvZ70Vr4yRxzaiUZlLyx1z8VudlU5oEFcwx4RLRSaB+6yMp1kCbmBSqcvn dadUt5KgGAnwIRMrQQ8svHj9ahlkPVQo+7WioeGFoV7VjHwnCWsK1cizpN6jhf8YoaSbszngQ 8KM1Fse8rtVmQVU02KU83LluV6QoQD2mTkeiv5WYURSUzSp9OqivXG7Mn6a0FO8moO1DgylqF 56cISadXTA0cov/bigcvQZqKbjcXZlYAbh2DTdtBUu99C060IAD18ySIugN4Mv0T+yEFANuAS hgV9sz1oek0m5q2n4JjwfO7lNaeDLbwzB54uHZNDvGl4N6ecMZp4ARD47SYIalgl6f7Y= Subject: Re: [PHP-DEV] PCRE JIT stack size limit From: cmbecker69@gmx.de (Christoph Becker) Hi Anatol, On 04.08.2015 at 11:24, Anatol Belski wrote: > Hi Christoph, > >> -----Original Message----- >> From: Christoph Becker [mailto:cmbecker69@gmx.de] >> Sent: Tuesday, August 4, 2015 2:35 AM >> To: Anatol Belski ; 'Christoph Becker' >> ; 'Pierre Joye' >> Cc: 'PHP internals' >> Subject: Re: [PHP-DEV] PCRE JIT stack size limit >> >> On 27.07.2015 at 13:28, Anatol Belski wrote: >> >>>> -----Original Message----- >>>> From: Christoph Becker [mailto:cmbecker69@gmx.de] >>>> Sent: Monday, July 27, 2015 12:06 AM >>>> To: Anatol Belski ; 'Pierre Joye' >>>> >>>> Cc: 'PHP internals' >>>> Subject: Re: [PHP-DEV] PCRE JIT stack size limit >>>> >> If we leave it as this, I suggest to make pcre.jit PHP_INI_PERDIR instead of >> PHP_INI_ALL for PHP 7.0. That still gives users the option to disable it (ideally >> even on shared hosting), but avoids issues when dynamically switching the >> setting with regard to our regexp caching. If we find a better solution for PHP >> 7.1, we still can extend it to PHP_INI_ALL without a BC break. >> > That would disable possibility to change it in the registry which is PHP_INI_USER. That's something about shared hosting, too. Ah, I see. Then we ought to prominently document that chaning the setting during script execution might not have the desired effect due to internal caching. >> For PHP 7.1 it might be worthwhile to consider to store jitted resp. >> non-jitted regexps in the cache, and to fetch what fits to the current setting of >> pcre.jit (and otherwise to compile again, adding the new entry to the cache, or >> maybe replacing it). >> > Not sure to understand what you mean. Storing every pattern in both variants studied with and without JIT? I didn't mean to store all patterns in both variants, but rather as requested. Say, the PHP script starts with pcre.jit=0, so all patterns will be stored studied without JIT. Then the script changes to pcre.jit=1. 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=0 will again keep the old patterns, but ensures that only those which have been studied without JIT are retrieved from the cache. -- Christoph M. Becker