The PCRE version (10.36) provided by Debian Bullseye in our PHP 8.1 images suffers from a JIT bug introduced in 10.35 and fixed in 10.39. This is impacting several patterns used in MW, notably an user-written AbuseFilter on ukwiki (T385395).
We should update the PCRE version in these images to version 10.39 or newer. One option is to simply use the PCRE 10.39 bundled by PHP 8.1 itself by building PHP without --with-external-pcre.
AC
Our PHP 8.1 images are using PCRE 10.39 or newer.
Resolution
We backported PCRE2 10.42 from Debian Bookworm.
