BytesRegex
=== 1. Thread-safe PCRE2 matching ====================================== Upstream BytesRegex::Regex allocates ONE match_data buffer per compiled pattern and reuses it for every match() call. Compiled rules are shared between all lexer instances via the template cache, so two workers matching the same rule corrupted each other's ovectors. Matching now writes into a per-thread scratch buffer — PCRE2 compiled patterns themselves are read-only and explicitly documented as safe to share across threads. Remove when: upstream stops sharing match_data across concurrent match() calls (per-call, per-thread, or lock-guarded).