[php-src] PR #12108: Fix GH-11956: PCRE regular expressions with JIT enabled gives different result
| From: | nielsdos | Date: | Sat, 02 Sep 2023 18:42:04 +0000 |
| Subject: | [php-src] PR #12108: Fix GH-11956: PCRE regular expressions with JIT enabled gives different result | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-23550@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/12108
Author: nielsdos
The code in the attached test used to work correctly in PHP 8.0, but not in 8.1+. This is because
PHP 8.1+ uses a more modern version of pcre2 than PHP 8.0, and that pcre2 versions has a regression.
While upgrading pcre2lib seems to be only done for the master branch, it is possible to backport
upstream fixes to stable branches. This has been already done in the past in for JIT regressions
[1], so it is not unprecedented.
We backport the upstream pcre2 fix [2].
[1] https://github.com/php/php-src/commit/788a701e222
[2] https://github.com/PCRE2Project/pcre2/pull/135
Fixes GH-11956.