Skip to content

Commit

Permalink
Fix #81424: PCRE2 10.35 JIT performance regression
Browse files Browse the repository at this point in the history
We backport the respective upstream fix[1] to our bundled pcre2lib.

[1] <PCRE2Project/pcre2@dc5f966>

Closes GH-7484.
  • Loading branch information
cmb69 committed Sep 13, 2021
1 parent 424c265 commit a247138
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ PHP NEWS
. Fixed bug #81433 (DOMElement::setIdAttribute() called twice may remove ID).
(Viktor Volkov)

- PCRE:
. Fixed bug #81424 (PCRE2 10.35 JIT performance regression). (cmb)

23 Dep 2021, PHP 7.4.24

- Core:
Expand Down
2 changes: 1 addition & 1 deletion ext/pcre/pcre2lib/pcre2_jit_compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -11152,7 +11152,7 @@ early_fail_type = (early_fail_ptr & 0x7);
early_fail_ptr >>= 3;

/* During recursion, these optimizations are disabled. */
if (common->early_fail_start_ptr == 0)
if (common->early_fail_start_ptr == 0 && common->fast_forward_bc_ptr == NULL)
{
early_fail_ptr = 0;
early_fail_type = type_skip;
Expand Down

0 comments on commit a247138

Please sign in to comment.