Commit d61efdf
committed
Fix GH-11956: PCRE regular expressions with JIT enabled gives different result
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] 788a701e222
[2] PCRE2Project/pcre2#135
Closes GH-12108.1 parent 910f579 commit d61efdf
3 files changed
+30
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11286 | 11286 | | |
11287 | 11287 | | |
11288 | 11288 | | |
11289 | | - | |
11290 | 11289 | | |
11291 | 11290 | | |
11292 | | - | |
11293 | | - | |
11294 | | - | |
11295 | | - | |
11296 | | - | |
11297 | | - | |
11298 | | - | |
| 11291 | + | |
| 11292 | + | |
| 11293 | + | |
| 11294 | + | |
| 11295 | + | |
| 11296 | + | |
| 11297 | + | |
| 11298 | + | |
11299 | 11299 | | |
11300 | | - | |
11301 | | - | |
| 11300 | + | |
| 11301 | + | |
11302 | 11302 | | |
11303 | 11303 | | |
11304 | 11304 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
0 commit comments