From 2f0401cf15206b99c1c4b09e1032b39c2cd7c5bc Mon Sep 17 00:00:00 2001 From: David Carlier Date: Thu, 26 Feb 2026 20:24:24 +0000 Subject: [PATCH] ext/pcre: drop negative-length match tests Newer PCRE2 rejects \K in lookarounds at compile time, so the negative-length match code path can no longer be triggered from userland PHP. The PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK flag that would re-enable it is only settable via the C compile context API. --- .../tests/preg_match_all_negative_length_match.phpt | 10 ---------- ext/pcre/tests/preg_match_negative_length_match.phpt | 10 ---------- 2 files changed, 20 deletions(-) delete mode 100644 ext/pcre/tests/preg_match_all_negative_length_match.phpt delete mode 100644 ext/pcre/tests/preg_match_negative_length_match.phpt diff --git a/ext/pcre/tests/preg_match_all_negative_length_match.phpt b/ext/pcre/tests/preg_match_all_negative_length_match.phpt deleted file mode 100644 index b18007cd3256..000000000000 --- a/ext/pcre/tests/preg_match_all_negative_length_match.phpt +++ /dev/null @@ -1,10 +0,0 @@ ---TEST-- -preg_match_all() resource cleanup when \K in lookahead causes negative-length match ---FILE-- - ---EXPECTF-- -Warning: preg_match_all(): Compilation failed: \K is not allowed in lookarounds (but see PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK) at offset %d in %s -bool(false) diff --git a/ext/pcre/tests/preg_match_negative_length_match.phpt b/ext/pcre/tests/preg_match_negative_length_match.phpt deleted file mode 100644 index 221ea4fb9e54..000000000000 --- a/ext/pcre/tests/preg_match_negative_length_match.phpt +++ /dev/null @@ -1,10 +0,0 @@ ---TEST-- -preg_match() resource cleanup when \K in lookahead causes negative-length match ---FILE-- - ---EXPECTF-- -Warning: preg_match(): Compilation failed: \K is not allowed in lookarounds (but see PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK) at offset %d in %s -bool(false)