Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91794 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29354 invoked from network); 20 Mar 2016 21:41:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Mar 2016 21:41:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=anatol.php@belski.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=anatol.php@belski.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain belski.net from 85.214.73.107 cause and error) X-PHP-List-Original-Sender: anatol.php@belski.net X-Host-Fingerprint: 85.214.73.107 klapt.com Received: from [85.214.73.107] ([85.214.73.107:42085] helo=h1123647.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3B/B9-48999-4091FE65 for ; Sun, 20 Mar 2016 16:41:24 -0500 Received: by h1123647.serverkompetenz.net (Postfix, from userid 1006) id D17A4782AE0; Sun, 20 Mar 2016 22:41:20 +0100 (CET) Received: from w530phpdev (pD9FE808D.dip0.t-ipconnect.de [217.254.128.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by h1123647.serverkompetenz.net (Postfix) with ESMTPSA id 639EA782AA8; Sun, 20 Mar 2016 22:41:18 +0100 (CET) To: "'David Zuelke'" Cc: "'Christoph Becker'" , "'Pierre Joye'" , "'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> <55C09EE2.7010400@gmx.de> <063f01d0cec2$91b9baf0$b52d30d0$@belski.net> <55C0F908.2050708@gmx.de> <068e01d0cefb$6ffba3e0$4ff2eba0$@belski.net> <016e01d17ef7$cd8a2660$689e7320$@belski.net> <25D67B35-88FF-4A5C-9421-BAF482B32A96@heroku.com> <036501d17fc3$d51357e0$7f3a07a0$@belski.net> <5E36AA30-831F-44BE-A148-8720B8E87E96@heroku.com> <94A89B0F-48BB-4DD8-A26B-3B6D2C8C2C9F@heroku.com> In-Reply-To: <94A89B0F-48BB-4DD8-A26B-3B6D2C8C2C9F@heroku.com> Date: Sun, 20 Mar 2016 22:41:13 +0100 Message-ID: <099201d182f1$3c954600$b5bfd200$@belski.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHD9RJvenw/Ss5kSkuHSfZFOrs2uQBWRtPIAqC4oYQC1yvg/gL/4swBAjr9PxcCDsvXWAGHs1w9AZmBwtoBoC/PpAI/kFTiAkX1QGcB3tOhmwMEMgs1AT7oJdYAllO0wAKAL1FjAiFBQeICQV6JkgJhEi44AhKb+lIBhT3EgQHWW/ZXAobZmfOeC3SdwA== Content-Language: en-us Subject: RE: [PHP-DEV] PCRE JIT stack size limit From: anatol.php@belski.net ("Anatol Belski") Hi, > -----Original Message----- > From: David Zuelke [mailto:dz@heroku.com] > Sent: Sunday, March 20, 2016 10:10 PM > To: Anatol Belski > Cc: Christoph Becker ; Pierre Joye > ; PHP internals > Subject: Re: [PHP-DEV] PCRE JIT stack size limit > > > On 17.03.2016, at 05:22, David Zuelke wrote: > > > >> On 16.03.2016, at 21:38, Anatol Belski wrote: > >> > >> Hi, > >> > >>> -----Original Message----- > >>> From: David Zuelke [mailto:dz@heroku.com] > >>> Sent: Tuesday, March 15, 2016 11:58 PM > >>> To: Anatol Belski > >>> Cc: Christoph Becker ; Pierre Joye > >>> ; PHP internals > >>> Subject: Re: [PHP-DEV] PCRE JIT stack size limit > >>> > >>> Sure. So composer creates patterns to parse a file dynamically; I > >>> have not figured out why it only happens for some composer.json > >>> files (or maybe it happens for all of them and I just have not > >>> noticed), but this example here I extracted from a reproducibly > >>> failing "composer require" run; it runs into the JIT stack size limit on PHP 7 > while it works fine on 5.x: > >>> > >>> https://gist.github.com/dzuelke/cc64a630c14416eda3e9 > >>> > >> I've just tried this on Debian Jessie and on Windows with the latest 7.0.x > builds, in both cases the error is PREG_BACKTRACK_LIMIT_ERROR. I'd be next > asking you to check the configuration. Runtime like system or ini, or build config > can affect this. Anyway, I don't see an issue with PCRE JIT at the moment. > > > > Sorry, I simplified the example too far. Updated it again to throw a JIT stack > limit error again (but works fine with "php -dpcre.jit=0"): > > > > https://gist.github.com/dzuelke/cc64a630c14416eda3e9/de7b7293798ac57b4 > > f75d822dc22a625be0fe9df > > Were you able to reproduce this? :) > Yes, it is reproducible. I was just investigating on another issue https://bugs.exim.org/show_bug.cgi?id=1803 which now seems unrelated. With the JIT stack - we can try to use a custom stack to increase its size by allocating a custom jit stack of an increased sizeas a workaround. If that works, it should be fine. I'll be working on a patch next week, then we can see this option makes sense. More on the topic is readable here http://www.pcre.org/original/doc/html/pcrejit.html#stackcontrol . Regards Anatol