Repository navigation
Vendored PCRE2 10.49 (from 10.44); close #3109 - #3135
Merged
Merged
Conversation
std/regex/pcre2/ is what std.regex runs without a system libpcre2-8, and in every `ae build --target` cross build. 10.49 is upstream's current release. Of the security fixes since 10.44, the one std.regex can reach (it calls compile, match and substitute, with no JIT) is GHSA-fmgr-6ggq-9859, integer overflows compiling a pattern on 32-bit CPUs, the vendored engine's cross targets. 10.45 split the compiler into pcre2_compile{,_cgroup,_class}.c, added pcre2_match_next.c, and turned jit_match, jit_misc and ucptables into *_inc.h includes; the unity TU and scripts/vendor-pcre2.sh follow NON-AUTOTOOLS-BUILD's list. LICENCE is LICENCE.md upstream now (SPDX BSD-3-Clause WITH PCRE2-exception), reproduced in THIRD_PARTY_LICENSES.md. The tarball's sha256 is GitHub's published asset digest, and its GPG signature checks against Nicholas Wilson's key, the one upstream's SECURITY.md names for 10.45 on. All 42 files compare byte-identical to the tarball. The unity TU compiles warning-free under gcc -Wall -Wextra and zig cc for x86_64-windows-gnu, aarch64-macos, x86_64-linux-musl and arm-linux-musleabihf; make test-ae with PCRE2=vendored passes but for the known local failures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates the vendored PCRE2 from 10.44 to 10.49, and closes #3109, whose fix has already landed (see below).
PCRE2 10.49
std/regex/pcre2/is whatstd.regexruns on a box without a system libpcre2-8, and in everyae build --targetcross build. Builds that use a system library are unchanged.Security. std.regex only calls
pcre2_compile,pcre2_matchandpcre2_substitute, with no JIT. Of the fixes since 10.44, the one it can reach is GHSA-fmgr-6ggq-9859: integer overflows while compiling a pattern on 32-bit CPUs, leading to out-of-bounds writes. That hits the vendored engine on its 32-bit cross targets. The rest are in code std.regex never calls:MATCH_INVALID_UTF;pcre2_convert;CVE-2025-58050 was introduced in 10.45 and fixed in 10.46, so this upgrade skips it.
Pattern behaviour changes (from upstream's NEWS):
\p{Ll}/\p{Lu}/[:lower:]match both cases, as Perl does.\xnot followed by{or a hex digit is no longer a NUL escape; write\x00.Layout changes.
pcre2_match_next.c.pcre2_jit_match.c,pcre2_jit_misc.candpcre2_ucptables.cbecame*_inc.hfiles.aether_pcre2_vendored.c) andscripts/vendor-pcre2.shnow followNON-AUTOTOOLS-BUILD's list of 31 sources. The script's comments now say how to check the signature and how to find the file list withgcc -MM.LICENCEtoLICENCE.md(SPDXBSD-3-Clause WITH PCRE2-exception);THIRD_PARTY_LICENSES.mdcarries the new text.Provenance.
A955 3620 4A3B B489 7152 3128 2A98 E77E B6F2 4CA8), the key upstream'sSECURITY.mdnames for releases from 10.45 on.Checked:
make PCRE2=vendoredfrom clean;libaether.areports10.49 2026-09-28.std/regex/test_regex.aepasses.regex_crossbuildpasses: x86_64-linux, no sysroot.make test-ae PCRE2=vendored: 1863 passed. The 6 failures are the known local ones, the same on main.-Wall -Wextraand under zig cc forx86_64-windows-gnu,aarch64-macos,x86_64-linux-muslandarm-linux-musleabihf.check-docs,check-tests,check-changelogandpublic_headerspass.#3109
Closes #3109. The fix landed in 7a110b6, "tinyweb serves its WebSocket, SSE and chunked endpoints through std.http, on the server's port (#3109)", which merged with #3101. That commit referenced the issue without a closing keyword, so the issue stayed open. Against the issue's checklist, on current main:
ws_client.ae.web_socketuseshttp.server_websocket, andsse_endpointuseshttp.server_sse.http.response_begin_chunked.with_timeoutandwith_keep_aliveare applied. The options that were stored but never read have been removed.contrib/tinyweb/test_streams.aecovers each test the issue asks for: a message over 64 KiB both ways, a binary message with zero bytes, ping → pong, an idle connection pastwith_timeout, an SSE handler stopping once its client leaves, and a chunked body read back whole. All 12 specs pass here.No code change was needed for it. It's included here so it closes without another CI run.
🤖 Generated with Claude Code