php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76514 Regression in preg_match makes it fail with PREG_JIT_STACKLIMIT_ERROR
Submitted: 2018-06-21 16:02 UTC Modified: 2018-06-21 21:34 UTC
From: seld@php.net Assigned:
Status: Closed Package: PCRE related
PHP Version: 7.3.0alpha2 OS: Linux
Private report: No CVE-ID: None
 [2018-06-21 16:02 UTC] seld@php.net
Description:
------------
preg_match fails with a PREG_JIT_STACKLIMIT_ERROR when it worked on 7.2 and below.


Test script:
---------------
It is quite lengthy so please see https://3v4l.org/EUu5k - the meat of it is in the last 10 lines, the rest is just a long test string we have in the composer test suite (that's where I found the failure: https://travis-ci.org/composer/composer/jobs/394160719 )

Expected result:
----------------
It should match as expected much like on older PHP releases


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-06-21 21:34 UTC] cmb@php.net
-Status: Open +Status: Verified
 [2018-06-21 21:34 UTC] cmb@php.net
PHP 7.3 upgraded to PCRE2, which apparently requires more
stack space for this pattern.  Increasing PCRE_JIT_STACK_MAX_SIZE[1]
to, say, 256 kibibytes should suffice in this case.

[1] <https://github.com/php/php-src/blob/71d16feebbb38f69007d8b7bec44afeb916281fb/ext/pcre/php_pcre.c#L78>
 [2018-06-22 09:06 UTC] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=bb2f1a683003559ada1c70166557bd7ac2845a11
Log: Fixed bug #76514 Regression in preg_match makes it fail with PREG_JIT_STACKLIMIT_ERROR
 [2018-06-22 09:06 UTC] ab@php.net
-Status: Verified +Status: Closed
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Thu Dec 13 22:01:26 2018 UTC