From d34c313a5478e2a7ff104a09621892ea63be5683 Mon Sep 17 00:00:00 2001 From: Nicholas Wilson Date: Wed, 12 Nov 2025 13:22:44 +0000 Subject: [PATCH] Add SUPPORT-LIFECYCLE document --- .gitattributes | 15 +- .github/workflows/sync.yml | 2 +- CMakeLists.txt | 1 + Makefile.am | 15 + README | 8 +- README.md | 2 + SECURITY.md | 34 +- SUPPORT-LIFECYCLE.md | 258 + doc/html/README.txt | 8 +- maint/README | 18 + maint/UpdateAlways | 1 + maint/manifest-cmakeinstall-freebsd | 1 + maint/manifest-cmakeinstall-linux | 1 + maint/manifest-cmakeinstall-macos | 1 + maint/manifest-cmakeinstall-solaris | 1 + maint/manifest-cmakeinstall-windows | 1 + maint/manifest-makeinstall-freebsd | 1 + maint/manifest-makeinstall-linux | 1 + maint/manifest-makeinstall-solaris | 1 + maint/manifest-tarball | 12 + patches/pcre2-10.37-Remove-real-POSIX.patch | 40 + .../pcre2-10.39-Fix-incorrect-detection.patch | 73 + patches/pcre2-10.40-A-Fixed-a-unicode.patch | 50 + ...re2-10.40-B-Fixed-an-issue-affecting.patch | 648 ++ ...pcre2-10.43-Avoid-LIMIT_HEAP-integer.patch | 137 + .../pcre2-10.43-Fix-heapframe-overflow.patch | 160 + .../pcre2-10.44-Fix-incorrect-compiling.patch | 64 + patches/pcre2-10.44-Fix-locking-region.patch | 38 + ...2-10.45-Memory-reports-only-compiled.patch | 5228 +++++++++++++++++ patches/pcre2-10.47-Fix-for-callback.patch | 177 + 30 files changed, 6977 insertions(+), 20 deletions(-) create mode 100644 SUPPORT-LIFECYCLE.md create mode 100644 patches/pcre2-10.37-Remove-real-POSIX.patch create mode 100644 patches/pcre2-10.39-Fix-incorrect-detection.patch create mode 100644 patches/pcre2-10.40-A-Fixed-a-unicode.patch create mode 100644 patches/pcre2-10.40-B-Fixed-an-issue-affecting.patch create mode 100644 patches/pcre2-10.43-Avoid-LIMIT_HEAP-integer.patch create mode 100644 patches/pcre2-10.43-Fix-heapframe-overflow.patch create mode 100644 patches/pcre2-10.44-Fix-incorrect-compiling.patch create mode 100644 patches/pcre2-10.44-Fix-locking-region.patch create mode 100644 patches/pcre2-10.45-Memory-reports-only-compiled.patch create mode 100644 patches/pcre2-10.47-Fix-for-callback.patch diff --git a/.gitattributes b/.gitattributes index bee725cda..363547eee 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,7 +1,8 @@ -testdata/* -text -maint/manifest-* -text -maint/ucptestdata -text -*.sh text eol=lf -pcre2-config.in text eol=lf -RunTest text eol=lf -RunGrepTest text eol=lf +testdata/* -text +maint/manifest-* -text +maint/ucptestdata -text +*.sh text eol=lf +*.patch text eol=lf +pcre2-config.in text eol=lf +RunTest text eol=lf +RunGrepTest text eol=lf diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 69989f93f..138915eef 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -90,7 +90,7 @@ jobs: - name: Commit and push, if docs have changed run: | if ! git diff --exit-code origin/main -- \ - ./doc ./AUTHORS.md ./LICENCE.md ./SECURITY.md ./README.md \ + ./doc ./AUTHORS.md ./LICENCE.md ./SECURITY.md ./SUPPORT-LIFECYCLE.md ./README.md \ ./README ./NON-AUTOTOOLS-BUILD >/dev/null ; then # Differences from main: merge and push git config user.name "github-actions[bot]" diff --git a/CMakeLists.txt b/CMakeLists.txt index ac3f8d001..e977f744a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1470,6 +1470,7 @@ file( NEWS README SECURITY.md + SUPPORT-LIFECYCLE.md ) file(GLOB man1 ${PROJECT_SOURCE_DIR}/doc/*.1) file(GLOB man3 ${PROJECT_SOURCE_DIR}/doc/*.3) diff --git a/Makefile.am b/Makefile.am index da5e3d912..f4311b225 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,6 +23,7 @@ dist_doc_DATA = \ NEWS \ README \ SECURITY.md \ + SUPPORT-LIFECYCLE.md \ doc/pcre2.txt \ doc/pcre2-config.txt \ doc/pcre2grep.txt \ @@ -289,6 +290,20 @@ EXTRA_DIST += \ NON-AUTOTOOLS-BUILD \ HACKING +# These are patches containing backports for older versions of PCRE2 + +EXTRA_DIST += \ + patches/pcre2-10.37-Remove-real-POSIX.patch \ + patches/pcre2-10.39-Fix-incorrect-detection.patch \ + patches/pcre2-10.40-A-Fixed-a-unicode.patch \ + patches/pcre2-10.40-B-Fixed-an-issue-affecting.patch \ + patches/pcre2-10.43-Avoid-LIMIT_HEAP-integer.patch \ + patches/pcre2-10.43-Fix-heapframe-overflow.patch \ + patches/pcre2-10.44-Fix-incorrect-compiling.patch \ + patches/pcre2-10.44-Fix-locking-region.patch \ + patches/pcre2-10.45-Memory-reports-only-compiled.patch \ + patches/pcre2-10.47-Fix-for-callback.patch + # These are support files for building with Bazel or Zig EXTRA_DIST += \ diff --git a/README b/README index 593bab279..d7f3c16ad 100644 --- a/README +++ b/README @@ -519,13 +519,14 @@ system. The following are installed (file names are all relative to the *.html (lots more pages, hyperlinked from index.html) Text file documentation (share/doc/pcre2): - AUTHORS + AUTHORS.md COPYING ChangeLog - LICENCE + LICENCE.md NEWS README - SECURITY + SECURITY.md + SUPPORT-LIFECYCLE.md pcre2.txt (a concatenation of the man(3) pages) pcre2test.txt the pcre2test man page pcre2grep.txt the pcre2grep man page @@ -920,6 +921,7 @@ The distribution should contain the files listed below. LICENCE.md conditions for the use of PCRE2 COPYING the same, using GNU's standard name SECURITY.md information on reporting vulnerabilities + SUPPORT-LIFECYCLE.md information on the support policy Makefile.in ) template for Unix Makefile, which is built by ) "configure" Makefile.am ) the automake input that was used to create diff --git a/README.md b/README.md index 1004d6887..63a511e0f 100644 --- a/README.md +++ b/README.md @@ -265,6 +265,8 @@ Join the community by reporting issues or asking questions via [GitHub issues](h Contributions ranging from bug fixes to feature requests are welcome, and can be made via GitHub pull requests. +Our support lifecycle is to backport security and high-severity bug fixes for at least five years. See [SUPPORT-LIFECYCLE](./SUPPORT-LIFECYCLE.md) for how to package older versions of PCRE2. + Please review our [SECURITY](./SECURITY.md) policy for information on reporting security issues. Release announcements will be made via the [pcre2-dev@googlegroups.com](https://groups.google.com/g/pcre2-dev) mailing list, where you can also start discussions about PCRE2 issues and development. You can browse the [list archives](https://groups.google.com/g/pcre2-dev). diff --git a/SECURITY.md b/SECURITY.md index a9cd7c166..4bbe5cd09 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -22,11 +22,12 @@ Git checkout of the (GPG-signed) release tag. Please contact the maintainers for any queries about release integrity or the project's supply-chain. -Previous vulnerabilities ------------------------- +Support lifecycle +----------------- -* CVE-2025-58050 (August 2025). Affects 10.45 only (not earlier), and is fixed - in 10.46. +See the documentation under [SUPPORT-LIFECYCLE](./SUPPORT-LIFECYCLE.md) for +details on how to distribute versions of PCRE2 older than the latest, with +backported security and high-severity bug fixes. Reporting vulnerabilities ------------------------- @@ -47,8 +48,7 @@ aim to respond within 1 week, or perhaps 2 during holidays. ### Response procedure -PCRE2 has in the past made at least one rapid release in response to -security incidents. +PCRE2 has in the past made rapid releases in response to security incidents. We have never produced an embargoed release, or provided preferential access to security fixes to any clients. @@ -57,3 +57,25 @@ We would aim to notify security managers from trusted downstream distributors, such as major Linux distributions, via the `pcre2-dev` mailing list, by publicly signalling an upcoming security release before disclosing the vulnerability publicly, where advance notification is possible. + +Previous vulnerabilities +------------------------ + +* CVE-2025-58050 (August 2025). Affects 10.45 only (not earlier), and is fixed + in 10.46. +* CVE-2022-41409 (July 2023). Only affects test code; no expected impact. Fixed + in 10.41. +* CVE-2022-1587 and CVE-2022-1586 (May 2020). Affect versions before 10.40, and + fixed in 10.40. +* CVE-2019-20454 (February 2020). Affects versions 10.31 to 10.33, and is fixed + in 10.34. +* CVE-2017-8786 (May 2017). Only affects test code. Fixed in 10.30. +* CVE-2017-8399 (May 2017). High severity. Fixed in 10.30. +* CVE-2017-7186 (March 2017). Fixed in 10.30. +* CVE-2016-3191 (March 2016). High severity. Fixed in 10.22. +* CVE-2015-8381, CVE-2015-3217 and CVE-2015-3210 (December 2015). High severity. + Fixed in 10.20. + +Common Platform Enumeration (CPE) names: +* CPE name version 2.3: `cpe:2.3:a:pcre:pcre2:-:*:*:*:*:*:*:*` +* CPE name version 2.2: `cpe:/a:pcre:pcre2:-` diff --git a/SUPPORT-LIFECYCLE.md b/SUPPORT-LIFECYCLE.md new file mode 100644 index 000000000..90d84a6b4 --- /dev/null +++ b/SUPPORT-LIFECYCLE.md @@ -0,0 +1,258 @@ +# PCRE2 Support Lifecycle + +This document outlines the support lifecycle policy for PCRE2 releases. It is +intended to provide clear guidance to distributors on the supported versions of +PCRE2, and the actions required to distribute older versions of PCRE2 securely. + +## Release policy + +PCRE2 releases follow a rolling version policy. There is one linear history of +releases, with each new release providing a mixture of enhancements and fixes to +the previous release. + +PCRE2 is designed to have a high level of backwards-compatibility and stability. +Where possible, we recommend that consumers of the library update to the latest +version. + +However, we recognise that Linux distributions in particular bundle older +versions for many years. To enable this practice, this document provides advice +on how to package and distribute older releases of PCRE2. + +This document will be updated with each new PCRE2 release to reflect the current +support status and any new lifecycle recommendations. + +## Actions for PCRE2 distributors and packagers + +* Check this document on each release of PCRE2. +* Each version of PCRE2 that you are supporting should be listed here. +* Check for any changes in the "patches to apply" section, and consider + backporting these. + +## Support Policy + +1. Each PCRE2 version will be supported for at least 5 years from its release + date. +2. Selected releases older than 5 years may continue to receive support if they + are actively distributed. +3. For supported versions, security and high-severity bug fixes will be + backported and listed in this document. + +The following distributions have been considered to determine support +requirements: + +- RHEL/CentOS/Fedora: Long lifecycle. Although it's listed at 10+ years, there + is effectively a freeze after five years of "Full Support", with presumably only + CVE fixes being backported after that during "Maintenance Support". + + Packages: https://src.fedoraproject.org/rpms/pcre2 + + Packages: https://gitlab.com/redhat/centos-stream/rpms/pcre2 + +- Debian: Five year lifecycle. There is a three-year period of full support. In + practice, backports to "oldoldstable" releases are made only if absolutely + required, such as a CVE that requires fixing for compliance reasons. The + "stable" and "oldstable" releases actively accumulate backported fixes. + + Packages: https://salsa.debian.org/debian/pcre2 + +- Ubuntu: Five year LTS. I believe most customers update fairly promptly every + two years, and few if any non-security backports are made to LTS releases + older than the current one. + + Packages: https://code.launchpad.net/ubuntu/+source/pcre2 + +- Alpine: Two year lifecycle. + + Packages: https://gitlab.alpinelinux.org/alpine/aports/-/tree/master/main/pcre2?ref_type=heads + +- SUSE: Extremely long lifecycle; PCRE2 will stop backporting fixes long before + SUSE drops support. + + Packages: https://build.opensuse.org/package/show/openSUSE:Factory/pcre2 + +- Arch: Rolling release. No need for backports. However, it is a major upstream + packaging source for the Arch-based ecosystem. + + Packages: https://gitlab.archlinux.org/archlinux/packaging/packages/pcre2 + +- Other notable primary packaging sources include: + * Gentoo + + https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-libs/libpcre2 + + * NixOS + + https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/pcre2/default.nix + +Please contact us if you would like the PCRE2 maintainers to be aware of your +packages, particularly if you are a distributor of PCRE2, and provide a support +lifecycle for old (not-latest) PCRE2 releases. + +## Supported Versions + +Below is the list of supported PCRE2 versions. For each version, specific +recommendations and backported fixes (if any) are provided. + +### PCRE2 10.32 10-September-2018 + +* Shipped in RHEL/CentOS 8 (EOL 31 May 2024). + +This version is older than 5 years, but remains listed in SUPPORT-LIFECYCLE.md +potentially until May 2029 (end of "Maintenance Support" for RHEL 8), in +recognition that customer workloads may be using this version until then. + +I am not providing a recommendation of what patches to apply. Distributors still +shipping this release have likely frozen their codebase at this point. + +For the record, RHEL 8 used the following sets of patches: +https://src.fedoraproject.org/rpms/pcre2/tree/f28, +https://gitlab.com/redhat/centos-stream/rpms/pcre2/-/tree/c8s?ref_type=heads + +The most serious of these was the backported mitigation for CVE-2019-20454 from +the fix in 10.34. + +### PCRE2 10.36 04-December-2020 + +* Shipped in Debian 11 "Bullseye" (EOL 31 Aug 2026). + +I am not providing a recommendation of what patches to apply. Distributors still +shipping this release have likely frozen their codebase at this point, since the +release of Debian 12. + +### PCRE2 10.37 26-May-2021 + +I am not providing a recommendation of what patches to apply. I am not aware of +any Linux distributions providing extended support for 10.37. I have not tested +this release with any backported fixes applied. + +Patches introduced: +* `patches/pcre2-10.37-Remove-real-POSIX.patch`: To be backported to older + versions as required. This changes a behaviour which has been present since + the beginning of PCRE2's libpcre2posix.so, although the behaviour was updated + in 10.33. Versions prior to 10.33 cannot benefit from the backport; versions + 10.33-10.36 may use the backport at the distributor's discretion (that is, if + users have requested it; but it is not needed otherwise). + +### PCRE2 10.38 01-October-2021 + +Do not use (update to 10.39). + +### PCRE2 10.39 29-October-2021 + +* Shipped in Ubuntu 22.04 "Jammy Jellyfish" (EOL 01 Apr 2027). + +I am not providing a recommendation of what patches to apply. Distributors still +shipping this release have likely frozen their codebase at this point, since the +release of Ubuntu 24.04. + +Patches introduced: +* `patches/pcre2-10.39-Fix-incorrect-detection.patch`: Significant bugfix for + JIT matching + +### PCRE2 10.40 15-April-2022 + +* Shipped in RHEL/CentOS 9 (EOL 31 May 2027). + +I am not providing a recommendation of what patches to apply. Distributors still +shipping this release have likely frozen their codebase at this point, since the +release of RHEL 10. + +For the record, RHEL/CentOS 9 ships rather more backported patches than other +distributions: +https://gitlab.com/redhat/centos-stream/rpms/pcre2/-/tree/c9s?ref_type=heads + +Some of these patches may be relevant to other distributions, but I have not +tested them myself for compatibility with 10.40 or other earlier releases. + +Patches introduced: +* `patches/pcre2-10.40-A-Fixed-a-unicode.patch`: Fixed CVE-2022-1586. This + affects all recent previous versions of PCRE2. +* `patches/pcre2-10.40-B-Fixed-an-issue-affecting.patch`: Fixed CVE-2022-1587. + This affects all recent previous versions of PCRE2. + +### PCRE2 10.41 06-December-2022 + +Do not use (update to 10.42). + +Introduced the fix for CVE-2022-41409. This only affects the pcre2test runner +for the test suite, so this fix is not backported. + +### PCRE2 10.42 11-December-2022 + +* Shipped in Debian 12 "Bookworm" (EOL 30 Jun 2028). +* Shipped in Ubuntu 24.04 "Noble Numbat" (EOL 25 Apr 2029). + +Users on RISC-V are advised to update to 10.43, or not use the JIT unless using +a backport for https://github.com/zherczeg/sljit/pull/223. Given the small +RISC-V userbase (especially on older releases), disabling the JIT for RISC-V +builds is likely acceptable. + +Patches to apply: +* `patches/pcre2-10.43-Avoid-LIMIT_HEAP-integer.patch` +* `patches/pcre2-10.43-Fix-heapframe-overflow.patch` + +### PCRE2 10.43 16-February-2024 + +* Shipped in Alpine 3.20 (EOL 01 Apr 2026) +* Shipped in Alpine 3.21 (EOL 01 Nov 2026) + +Patches to apply: +* `patches/pcre2-10.44-Fix-locking-region.patch` +* `patches/pcre2-10.44-Fix-incorrect-compiling.patch` + +Patches introduced: +* `patches/pcre2-10.43-Avoid-LIMIT_HEAP-integer.patch`: Fix integer overflow in + handling of LIMIT_HEAP. This is not a critical fix for backporting, and in + 10.41, the code for handling the heapframes changed to always using a + heap-allocated frames vector. This patch is therefore recommended for + backporting to 10.42 only. +* `patches/pcre2-10.43-Fix-heapframe-overflow.patch`: Fix buffer overrun in + handling of LIMIT_HEAP. These patches can be backported to all recent previous + versions (since LIMIT_HEAP was introduced in 10.30). + +### PCRE2 10.44 07-June-2024 + +* Shipped in RHEL/CentOS 10 (EOL 31 May 2030). + +Patches to apply: +* `patches/pcre2-10.45-Memory-reports-only-compiled.patch` + +Patches introduced: +* `patches/pcre2-10.44-Fix-locking-region.patch`: To be backported to 10.43 only + (bug introduced in 10.43). Crashes in multithreaded applications using the PCRE2 + JIT were likely in 10.43 without this patch. +* `patches/pcre2-10.44-Fix-incorrect-compiling.patch`: Fixes a bug causing + incorrect compilation of certain patterns which could crashes, for backporting + to 10.43. Because 10.42 and earlier required fixed-length lookbehinds, the + patch does not require backporting to earlier versions. + +### PCRE2 10.45 05-February-2025 + +Do not use (update to 10.46, which is is a drop-in compatible release with a +security fix). + +Patches introduced: +* `patches/pcre2-10.45-Memory-reports-only-compiled.patch`: To be backported to + 10.44 only. This is a test-only fix, so is not important to backport unless + test suite failures are observed. + +### PCRE2 10.46 27-August-2025 + +* Shipped in Debian 13 "Trixie" (EOL 30 Jun 2030). +* Shipped in Alpine 3.22 (EOL 01 May 2027) + +Introduced the fix for CVE-2025-58050. This only affects 10.45. Do not backport +the patch (just update to 10.46). + +Patches to apply: +* `patches/pcre2-10.47-Fix-for-callback.patch` + +### PCRE2 10.47 21-October-2025 + +Patches introduced: +* `patches/pcre2-10.47-Fix-for-callback.patch`: A fix for a significant memory + read overrun in a function rarely called by applications, to be backported to + 10.45 and 10.46 only (bug introduced in 10.45). +* There is a new and rewritten JIT implementation for the AArch64 SIMD code, + fixing crashes and out-of-bounds memory reads in the previous, legacy AArch64 + JIT. This is probably not possible to backport. diff --git a/doc/html/README.txt b/doc/html/README.txt index 593bab279..d7f3c16ad 100644 --- a/doc/html/README.txt +++ b/doc/html/README.txt @@ -519,13 +519,14 @@ system. The following are installed (file names are all relative to the *.html (lots more pages, hyperlinked from index.html) Text file documentation (share/doc/pcre2): - AUTHORS + AUTHORS.md COPYING ChangeLog - LICENCE + LICENCE.md NEWS README - SECURITY + SECURITY.md + SUPPORT-LIFECYCLE.md pcre2.txt (a concatenation of the man(3) pages) pcre2test.txt the pcre2test man page pcre2grep.txt the pcre2grep man page @@ -920,6 +921,7 @@ The distribution should contain the files listed below. LICENCE.md conditions for the use of PCRE2 COPYING the same, using GNU's standard name SECURITY.md information on reporting vulnerabilities + SUPPORT-LIFECYCLE.md information on the support policy Makefile.in ) template for Unix Makefile, which is built by ) "configure" Makefile.am ) the automake input that was used to create diff --git a/maint/README b/maint/README index 68dd4e308..7cc605e2d 100644 --- a/maint/README +++ b/maint/README @@ -260,6 +260,24 @@ new release. -- ':!doc/*.txt' ':!doc/html' ``` +* Inspect the ChangeLog and Git log for any changes eligible for backporting to + older PCRE2 releases. Any crashes, memory errors, or serious match-correctness + errors may be backported. + + - Check that a CVE has been assigned, if there are security implications. + + - Examine the change and determine the earliest version of PCRE2 it applies + to. + + - Extract the patch file (with a test case) in the patches/ directory. + + - Ensure the patch applies cleanly, and the test passes, for each old version + of PCRE2 where we recommend the patch to be applied. + + - Include the patch in the tarball in Makefile.am. + + - Announce the patch in SUPPORT-LIFECYCLE.md. + * Update the library version numbers in configure.ac according to the rules given below. diff --git a/maint/UpdateAlways b/maint/UpdateAlways index da428dc9c..f824d016f 100755 --- a/maint/UpdateAlways +++ b/maint/UpdateAlways @@ -239,6 +239,7 @@ txt_files=( RunGrepTest RunTest SECURITY.md + SUPPORT-LIFECYCLE.md build.zig configure.ac libpcre2-8.pc.in diff --git a/maint/manifest-cmakeinstall-freebsd b/maint/manifest-cmakeinstall-freebsd index dc523530d..77432d04d 100644 --- a/maint/manifest-cmakeinstall-freebsd +++ b/maint/manifest-cmakeinstall-freebsd @@ -44,6 +44,7 @@ drwxr-xr-x install-dir/share/doc/pcre2 -rw-r--r-- install-dir/share/doc/pcre2/NEWS -rw-r--r-- install-dir/share/doc/pcre2/README -rw-r--r-- install-dir/share/doc/pcre2/SECURITY.md +-rw-r--r-- install-dir/share/doc/pcre2/SUPPORT-LIFECYCLE.md drwxr-xr-x install-dir/share/doc/pcre2/html -rw-r--r-- install-dir/share/doc/pcre2/html/NON-AUTOTOOLS-BUILD.txt -rw-r--r-- install-dir/share/doc/pcre2/html/README.txt diff --git a/maint/manifest-cmakeinstall-linux b/maint/manifest-cmakeinstall-linux index b906f0f5c..2996a9ae1 100644 --- a/maint/manifest-cmakeinstall-linux +++ b/maint/manifest-cmakeinstall-linux @@ -44,6 +44,7 @@ drwxr-xr-x install-dir/share/doc/pcre2 -rw-r--r-- install-dir/share/doc/pcre2/NEWS -rw-r--r-- install-dir/share/doc/pcre2/README -rw-r--r-- install-dir/share/doc/pcre2/SECURITY.md +-rw-r--r-- install-dir/share/doc/pcre2/SUPPORT-LIFECYCLE.md drwxr-xr-x install-dir/share/doc/pcre2/html -rw-r--r-- install-dir/share/doc/pcre2/html/NON-AUTOTOOLS-BUILD.txt -rw-r--r-- install-dir/share/doc/pcre2/html/README.txt diff --git a/maint/manifest-cmakeinstall-macos b/maint/manifest-cmakeinstall-macos index 92f181a1d..d08a80e62 100644 --- a/maint/manifest-cmakeinstall-macos +++ b/maint/manifest-cmakeinstall-macos @@ -44,6 +44,7 @@ drwxr-xr-x install-dir/share/doc/pcre2 -rw-r--r-- install-dir/share/doc/pcre2/NEWS -rw-r--r-- install-dir/share/doc/pcre2/README -rw-r--r-- install-dir/share/doc/pcre2/SECURITY.md +-rw-r--r-- install-dir/share/doc/pcre2/SUPPORT-LIFECYCLE.md drwxr-xr-x install-dir/share/doc/pcre2/html -rw-r--r-- install-dir/share/doc/pcre2/html/NON-AUTOTOOLS-BUILD.txt -rw-r--r-- install-dir/share/doc/pcre2/html/README.txt diff --git a/maint/manifest-cmakeinstall-solaris b/maint/manifest-cmakeinstall-solaris index 4823b4804..6d6b28d2f 100644 --- a/maint/manifest-cmakeinstall-solaris +++ b/maint/manifest-cmakeinstall-solaris @@ -44,6 +44,7 @@ drwxr-xr-x install-dir/share/doc/pcre2 -rw-r--r-- install-dir/share/doc/pcre2/NEWS -rw-r--r-- install-dir/share/doc/pcre2/README -rw-r--r-- install-dir/share/doc/pcre2/SECURITY.md +-rw-r--r-- install-dir/share/doc/pcre2/SUPPORT-LIFECYCLE.md drwxr-xr-x install-dir/share/doc/pcre2/html -rw-r--r-- install-dir/share/doc/pcre2/html/NON-AUTOTOOLS-BUILD.txt -rw-r--r-- install-dir/share/doc/pcre2/html/README.txt diff --git a/maint/manifest-cmakeinstall-windows b/maint/manifest-cmakeinstall-windows index faaf8a8bd..84e0fb25c 100644 --- a/maint/manifest-cmakeinstall-windows +++ b/maint/manifest-cmakeinstall-windows @@ -39,6 +39,7 @@ d---- .\install-dir\share\doc\pcre2 -a--- .\install-dir\share\doc\pcre2\NEWS -a--- .\install-dir\share\doc\pcre2\README -a--- .\install-dir\share\doc\pcre2\SECURITY.md +-a--- .\install-dir\share\doc\pcre2\SUPPORT-LIFECYCLE.md d---- .\install-dir\share\doc\pcre2\html -a--- .\install-dir\share\doc\pcre2\html\NON-AUTOTOOLS-BUILD.txt -a--- .\install-dir\share\doc\pcre2\html\README.txt diff --git a/maint/manifest-makeinstall-freebsd b/maint/manifest-makeinstall-freebsd index 7617d0ad8..07ee7d45d 100644 --- a/maint/manifest-makeinstall-freebsd +++ b/maint/manifest-makeinstall-freebsd @@ -44,6 +44,7 @@ drwxr-xr-x install-dir/usr/local/share/doc/pcre2 -rw-r--r-- install-dir/usr/local/share/doc/pcre2/NEWS -rw-r--r-- install-dir/usr/local/share/doc/pcre2/README -rw-r--r-- install-dir/usr/local/share/doc/pcre2/SECURITY.md +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/SUPPORT-LIFECYCLE.md drwxr-xr-x install-dir/usr/local/share/doc/pcre2/html -rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/NON-AUTOTOOLS-BUILD.txt -rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/README.txt diff --git a/maint/manifest-makeinstall-linux b/maint/manifest-makeinstall-linux index f216e11b9..1f32b5134 100644 --- a/maint/manifest-makeinstall-linux +++ b/maint/manifest-makeinstall-linux @@ -44,6 +44,7 @@ drwxr-xr-x install-dir/usr/local/share/doc/pcre2 -rw-r--r-- install-dir/usr/local/share/doc/pcre2/NEWS -rw-r--r-- install-dir/usr/local/share/doc/pcre2/README -rw-r--r-- install-dir/usr/local/share/doc/pcre2/SECURITY.md +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/SUPPORT-LIFECYCLE.md drwxr-xr-x install-dir/usr/local/share/doc/pcre2/html -rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/NON-AUTOTOOLS-BUILD.txt -rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/README.txt diff --git a/maint/manifest-makeinstall-solaris b/maint/manifest-makeinstall-solaris index f216e11b9..1f32b5134 100644 --- a/maint/manifest-makeinstall-solaris +++ b/maint/manifest-makeinstall-solaris @@ -44,6 +44,7 @@ drwxr-xr-x install-dir/usr/local/share/doc/pcre2 -rw-r--r-- install-dir/usr/local/share/doc/pcre2/NEWS -rw-r--r-- install-dir/usr/local/share/doc/pcre2/README -rw-r--r-- install-dir/usr/local/share/doc/pcre2/SECURITY.md +-rw-r--r-- install-dir/usr/local/share/doc/pcre2/SUPPORT-LIFECYCLE.md drwxr-xr-x install-dir/usr/local/share/doc/pcre2/html -rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/NON-AUTOTOOLS-BUILD.txt -rw-r--r-- install-dir/usr/local/share/doc/pcre2/html/README.txt diff --git a/maint/manifest-tarball b/maint/manifest-tarball index be0ef0d66..f1829b4b3 100644 --- a/maint/manifest-tarball +++ b/maint/manifest-tarball @@ -19,6 +19,7 @@ drwxr-xr-x tarball-dir/pcre2-SNAPSHOT -rwxr-xr-x tarball-dir/pcre2-SNAPSHOT/RunTest -rw-r--r-- tarball-dir/pcre2-SNAPSHOT/RunTest.bat -rw-r--r-- tarball-dir/pcre2-SNAPSHOT/SECURITY.md +-rw-r--r-- tarball-dir/pcre2-SNAPSHOT/SUPPORT-LIFECYCLE.md -rw-r--r-- tarball-dir/pcre2-SNAPSHOT/aclocal.m4 -rwxr-xr-x tarball-dir/pcre2-SNAPSHOT/ar-lib -rw-r--r-- tarball-dir/pcre2-SNAPSHOT/build.zig @@ -301,6 +302,17 @@ drwxr-xr-x tarball-dir/pcre2-SNAPSHOT/m4 -rw-r--r-- tarball-dir/pcre2-SNAPSHOT/m4/pcre2_visibility.m4 -rw-r--r-- tarball-dir/pcre2-SNAPSHOT/m4/pcre2_zos.m4 -rwxr-xr-x tarball-dir/pcre2-SNAPSHOT/missing +drwxr-xr-x tarball-dir/pcre2-SNAPSHOT/patches +-rw-r--r-- tarball-dir/pcre2-SNAPSHOT/patches/pcre2-10.37-Remove-real-POSIX.patch +-rw-r--r-- tarball-dir/pcre2-SNAPSHOT/patches/pcre2-10.39-Fix-incorrect-detection.patch +-rw-r--r-- tarball-dir/pcre2-SNAPSHOT/patches/pcre2-10.40-A-Fixed-a-unicode.patch +-rw-r--r-- tarball-dir/pcre2-SNAPSHOT/patches/pcre2-10.40-B-Fixed-an-issue-affecting.patch +-rw-r--r-- tarball-dir/pcre2-SNAPSHOT/patches/pcre2-10.43-Avoid-LIMIT_HEAP-integer.patch +-rw-r--r-- tarball-dir/pcre2-SNAPSHOT/patches/pcre2-10.43-Fix-heapframe-overflow.patch +-rw-r--r-- tarball-dir/pcre2-SNAPSHOT/patches/pcre2-10.44-Fix-incorrect-compiling.patch +-rw-r--r-- tarball-dir/pcre2-SNAPSHOT/patches/pcre2-10.44-Fix-locking-region.patch +-rw-r--r-- tarball-dir/pcre2-SNAPSHOT/patches/pcre2-10.45-Memory-reports-only-compiled.patch +-rw-r--r-- tarball-dir/pcre2-SNAPSHOT/patches/pcre2-10.47-Fix-for-callback.patch -rw-r--r-- tarball-dir/pcre2-SNAPSHOT/pcre2-config.in -rwxr-xr-x tarball-dir/pcre2-SNAPSHOT/perltest.sh drwxr-xr-x tarball-dir/pcre2-SNAPSHOT/src diff --git a/patches/pcre2-10.37-Remove-real-POSIX.patch b/patches/pcre2-10.37-Remove-real-POSIX.patch new file mode 100644 index 000000000..22b50c051 --- /dev/null +++ b/patches/pcre2-10.37-Remove-real-POSIX.patch @@ -0,0 +1,40 @@ +commit 080d7789eba00b570181dfe28809b01aa88c01f8 +Author: Philip.Hazel +Date: Tue Apr 27 08:36:47 2021 +0000 + + Remove real POSIX function names from the pcre2-posix library. + +diff --git a/src/pcre2posix.c b/src/pcre2posix.c +index b24620a4..32c80c3f 100644 +--- a/src/pcre2posix.c ++++ b/src/pcre2posix.c +@@ -175,6 +175,20 @@ static const char *const pstring[] = { + + + ++#if 0 /* REMOVE THIS CODE */ ++ ++The code below was created for 10.33 (see ChangeLog 10.33 #4) when the ++POSIX functions were given pcre2_... names instead of the traditional POSIX ++names. However, it has proved to be more troublesome than useful. There have ++been at least two cases where a program links with two others, one of which ++uses the POSIX library and the other uses the PCRE2 POSIX functions, thus ++causing two instances of the POSIX runctions to exist, leading to trouble. For ++10.37 this code is commented out. In due course it can be removed if there are ++no issues. The only small worry is the comment below about languages that do ++not include pcre2posix.h. If there are any such cases, they will have to use ++the PCRE2 names. ++ ++ + /************************************************* + * Wrappers with traditional POSIX names * + *************************************************/ +@@ -218,7 +232,7 @@ regexec(const regex_t *preg, const char *string, size_t nmatch, + { + return pcre2_regexec(preg, string, nmatch, pmatch, eflags); + } +- ++#endif + + + /************************************************* diff --git a/patches/pcre2-10.39-Fix-incorrect-detection.patch b/patches/pcre2-10.39-Fix-incorrect-detection.patch new file mode 100644 index 000000000..6048a79eb --- /dev/null +++ b/patches/pcre2-10.39-Fix-incorrect-detection.patch @@ -0,0 +1,73 @@ +commit 51ec2c9893e7dac762b70033b85f55801b01176c +Author: Zoltan Herczeg +Date: Tue Oct 5 16:40:57 2021 +0000 + + Fix incorrect detection of alternatives in first character search. + +diff --git a/ChangeLog b/ChangeLog +index e0ac9b3b..05b317c2 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,6 +1,12 @@ + Change Log for PCRE2 + -------------------- + ++Version 10.39-RC1 xx-xxx-2021 ++----------------------------- ++ ++1. Fix incorrect detection of alternatives in first character search. ++ ++ + Version 10.38 01-October-2021 + ----------------------------- + +diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c +index 495920de..2c614065 100644 +--- a/src/pcre2_jit_compile.c ++++ b/src/pcre2_jit_compile.c +@@ -1251,10 +1251,13 @@ SLJIT_ASSERT(*cc == OP_ONCE || *cc == OP_BRA || *cc == OP_CBRA); + SLJIT_ASSERT(*cc != OP_CBRA || common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] != 0); + SLJIT_ASSERT(start < EARLY_FAIL_ENHANCE_MAX); + ++next_alt = cc + GET(cc, 1); ++if (*next_alt == OP_ALT) ++ fast_forward_allowed = FALSE; ++ + do + { + count = start; +- next_alt = cc + GET(cc, 1); + cc += 1 + LINK_SIZE + ((*cc == OP_CBRA) ? IMM2_SIZE : 0); + + while (TRUE) +@@ -1512,7 +1515,7 @@ do + { + count++; + +- if (fast_forward_allowed && *next_alt == OP_KET) ++ if (fast_forward_allowed) + { + common->fast_forward_bc_ptr = accelerated_start; + common->private_data_ptrs[(accelerated_start + 1) - common->start] = ((*private_data_start) << 3) | type_skip; +@@ -1562,8 +1565,8 @@ do + else if (result < count) + result = count; + +- fast_forward_allowed = FALSE; + cc = next_alt; ++ next_alt = cc + GET(cc, 1); + } + while (*cc == OP_ALT); + +diff --git a/src/pcre2_jit_test.c b/src/pcre2_jit_test.c +index f7480165..8dee16e5 100644 +--- a/src/pcre2_jit_test.c ++++ b/src/pcre2_jit_test.c +@@ -352,6 +352,7 @@ static struct regression_test_case regression_test_cases[] = { + { MU, A, 0, 0, ".[ab]?.", "xx" }, + { MU, A, 0, 0, "_[ab]+_*a", "_aa" }, + { MU, A, 0, 0, "#(A+)#\\d+", "#A#A#0" }, ++ { MU, A, 0, 0, "(?P\\d+)m|M", "4M" }, + + /* Bracket repeats with limit. */ + { MU, A, 0, 0, "(?:(ab){2}){5}M", "abababababababababababM" }, diff --git a/patches/pcre2-10.40-A-Fixed-a-unicode.patch b/patches/pcre2-10.40-A-Fixed-a-unicode.patch new file mode 100644 index 000000000..2d89da978 --- /dev/null +++ b/patches/pcre2-10.40-A-Fixed-a-unicode.patch @@ -0,0 +1,50 @@ +commit d4fa336fbcc388f89095b184ba6d99422cfc676c +Author: Zoltan Herczeg +Date: Thu Mar 24 05:34:42 2022 +0000 + + Fix incorrect value reading in JIT. + +commit 50a51cb7e67268e6ad417eb07c9de9bfea5cc55a +Author: Zoltan Herczeg +Date: Wed Mar 23 07:53:25 2022 +0000 + + Fixed a unicode properrty matching issue in JIT +diff --git a/ChangeLog b/ChangeLog +index f0eab7ba..ffb08805 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -92,6 +92,9 @@ pattern, the optimizing "must be present for a match" character check was not + being flagged as caseless, causing some matches that should have succeeded to + fail. + ++23. Fixed a unicode properrty matching issue in JIT. The character was not ++fully read in caseless matching. ++ + + Version 10.39 29-October-2021 + ----------------------------- +diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c +index e7dd26c5..7fcdac86 100644 +--- a/src/pcre2_jit_compile.c ++++ b/src/pcre2_jit_compile.c +@@ -7489,7 +7489,7 @@ while (*cc != XCL_END) + { + SLJIT_ASSERT(*cc == XCL_PROP || *cc == XCL_NOTPROP); + cc++; +- if (*cc == PT_CLIST) ++ if (*cc == PT_CLIST && cc[-1] == XCL_PROP) + { + other_cases = PRIV(ucd_caseless_sets) + cc[1]; + while (*other_cases != NOTACHAR) +diff --git a/src/pcre2_jit_test.c b/src/pcre2_jit_test.c +index 3b57ce29..8450f0b6 100644 +--- a/src/pcre2_jit_test.c ++++ b/src/pcre2_jit_test.c +@@ -415,6 +415,7 @@ static struct regression_test_case regression_test_cases[] = { + { MUP, 0, 0, 0 | F_NOMATCH, "[^\\p{Hangul}\\p{Z}]", " " }, + { MUP, 0, 0, 0, "[\\p{Lu}\\P{Latin}]+", "c\xEA\xA4\xAE,A,b" }, + { MUP, 0, 0, 0, "[\\x{a92e}\\p{Lu}\\P{Latin}]+", "c\xEA\xA4\xAE,A,b" }, ++ { CMUP, 0, 0, 0, "[^S]\\B", "\xe2\x80\x8a" }, + + /* Possible empty brackets. */ + { MU, A, 0, 0, "(?:|ab||bc|a)+d", "abcxabcabd" }, diff --git a/patches/pcre2-10.40-B-Fixed-an-issue-affecting.patch b/patches/pcre2-10.40-B-Fixed-an-issue-affecting.patch new file mode 100644 index 000000000..c6bf2fd15 --- /dev/null +++ b/patches/pcre2-10.40-B-Fixed-an-issue-affecting.patch @@ -0,0 +1,648 @@ +commit 03654e751e7f0700693526b67dfcadda6b42c9d0 +Author: Zoltan Herczeg +Date: Sat Mar 26 07:55:50 2022 +0000 + + Fixed an issue affecting recursions in JIT + +diff --git a/ChangeLog b/ChangeLog +index ffb08805..a8000774 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -95,6 +95,9 @@ fail. + 23. Fixed a unicode properrty matching issue in JIT. The character was not + fully read in caseless matching. + ++24. Fixed an issue affecting recursions in JIT caused by duplicated data ++transfers. ++ + + Version 10.39 29-October-2021 + ----------------------------- +diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c +index 7fcdac86..bf71d158 100644 +--- a/src/pcre2_jit_compile.c ++++ b/src/pcre2_jit_compile.c +@@ -413,6 +413,9 @@ typedef struct compiler_common { + /* Locals used by fast fail optimization. */ + sljit_s32 early_fail_start_ptr; + sljit_s32 early_fail_end_ptr; ++ /* Variables used by recursive call generator. */ ++ sljit_s32 recurse_bitset_size; ++ uint8_t *recurse_bitset; + + /* Flipped and lower case tables. */ + const sljit_u8 *fcc; +@@ -2317,19 +2320,39 @@ for (i = 0; i < RECURSE_TMP_REG_COUNT; i++) + + #undef RECURSE_TMP_REG_COUNT + ++static BOOL recurse_check_bit(compiler_common *common, sljit_sw bit_index) ++{ ++uint8_t *byte; ++uint8_t mask; ++ ++SLJIT_ASSERT((bit_index & (sizeof(sljit_sw) - 1)) == 0); ++ ++bit_index >>= SLJIT_WORD_SHIFT; ++ ++mask = 1 << (bit_index & 0x7); ++byte = common->recurse_bitset + (bit_index >> 3); ++ ++if (*byte & mask) ++ return FALSE; ++ ++*byte |= mask; ++return TRUE; ++} ++ + static int get_recurse_data_length(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPTR ccend, + BOOL *needs_control_head, BOOL *has_quit, BOOL *has_accept) + { + int length = 1; +-int size; ++int size, offset; + PCRE2_SPTR alternative; + BOOL quit_found = FALSE; + BOOL accept_found = FALSE; + BOOL setsom_found = FALSE; + BOOL setmark_found = FALSE; +-BOOL capture_last_found = FALSE; + BOOL control_head_found = FALSE; + ++memset(common->recurse_bitset, 0, common->recurse_bitset_size); ++ + #if defined DEBUG_FORCE_CONTROL_HEAD && DEBUG_FORCE_CONTROL_HEAD + SLJIT_ASSERT(common->control_head_ptr != 0); + control_head_found = TRUE; +@@ -2352,15 +2375,17 @@ while (cc < ccend) + setsom_found = TRUE; + if (common->mark_ptr != 0) + setmark_found = TRUE; +- if (common->capture_last_ptr != 0) +- capture_last_found = TRUE; ++ if (common->capture_last_ptr != 0 && recurse_check_bit(common, common->capture_last_ptr)) ++ length++; + cc += 1 + LINK_SIZE; + break; + + case OP_KET: +- if (PRIVATE_DATA(cc) != 0) ++ offset = PRIVATE_DATA(cc); ++ if (offset != 0) + { +- length++; ++ if (recurse_check_bit(common, offset)) ++ length++; + SLJIT_ASSERT(PRIVATE_DATA(cc + 1) != 0); + cc += PRIVATE_DATA(cc + 1); + } +@@ -2379,39 +2404,55 @@ while (cc < ccend) + case OP_SBRA: + case OP_SBRAPOS: + case OP_SCOND: +- length++; + SLJIT_ASSERT(PRIVATE_DATA(cc) != 0); ++ if (recurse_check_bit(common, PRIVATE_DATA(cc))) ++ length++; + cc += 1 + LINK_SIZE; + break; + + case OP_CBRA: + case OP_SCBRA: +- length += 2; +- if (common->capture_last_ptr != 0) +- capture_last_found = TRUE; +- if (common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] == 0) ++ offset = GET2(cc, 1 + LINK_SIZE); ++ if (recurse_check_bit(common, OVECTOR(offset << 1))) ++ { ++ SLJIT_ASSERT(recurse_check_bit(common, OVECTOR((offset << 1) + 1))); ++ length += 2; ++ } ++ if (common->optimized_cbracket[offset] == 0 && recurse_check_bit(common, OVECTOR_PRIV(offset))) ++ length++; ++ if (common->capture_last_ptr != 0 && recurse_check_bit(common, common->capture_last_ptr)) + length++; + cc += 1 + LINK_SIZE + IMM2_SIZE; + break; + + case OP_CBRAPOS: + case OP_SCBRAPOS: +- length += 2 + 2; +- if (common->capture_last_ptr != 0) +- capture_last_found = TRUE; ++ offset = GET2(cc, 1 + LINK_SIZE); ++ if (recurse_check_bit(common, OVECTOR(offset << 1))) ++ { ++ SLJIT_ASSERT(recurse_check_bit(common, OVECTOR((offset << 1) + 1))); ++ length += 2; ++ } ++ if (recurse_check_bit(common, OVECTOR_PRIV(offset))) ++ length++; ++ if (recurse_check_bit(common, PRIVATE_DATA(cc))) ++ length++; ++ if (common->capture_last_ptr != 0 && recurse_check_bit(common, common->capture_last_ptr)) ++ length++; + cc += 1 + LINK_SIZE + IMM2_SIZE; + break; + + case OP_COND: + /* Might be a hidden SCOND. */ + alternative = cc + GET(cc, 1); +- if (*alternative == OP_KETRMAX || *alternative == OP_KETRMIN) ++ if ((*alternative == OP_KETRMAX || *alternative == OP_KETRMIN) && recurse_check_bit(common, PRIVATE_DATA(cc))) + length++; + cc += 1 + LINK_SIZE; + break; + + CASE_ITERATOR_PRIVATE_DATA_1 +- if (PRIVATE_DATA(cc) != 0) ++ offset = PRIVATE_DATA(cc); ++ if (offset != 0 && recurse_check_bit(common, offset)) + length++; + cc += 2; + #ifdef SUPPORT_UNICODE +@@ -2420,8 +2461,12 @@ while (cc < ccend) + break; + + CASE_ITERATOR_PRIVATE_DATA_2A +- if (PRIVATE_DATA(cc) != 0) ++ offset = PRIVATE_DATA(cc); ++ if (offset != 0 && recurse_check_bit(common, offset)) ++ { ++ SLJIT_ASSERT(recurse_check_bit(common, offset + sizeof(sljit_sw))); + length += 2; ++ } + cc += 2; + #ifdef SUPPORT_UNICODE + if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]); +@@ -2429,8 +2474,12 @@ while (cc < ccend) + break; + + CASE_ITERATOR_PRIVATE_DATA_2B +- if (PRIVATE_DATA(cc) != 0) ++ offset = PRIVATE_DATA(cc); ++ if (offset != 0 && recurse_check_bit(common, offset)) ++ { ++ SLJIT_ASSERT(recurse_check_bit(common, offset + sizeof(sljit_sw))); + length += 2; ++ } + cc += 2 + IMM2_SIZE; + #ifdef SUPPORT_UNICODE + if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]); +@@ -2438,20 +2487,29 @@ while (cc < ccend) + break; + + CASE_ITERATOR_TYPE_PRIVATE_DATA_1 +- if (PRIVATE_DATA(cc) != 0) ++ offset = PRIVATE_DATA(cc); ++ if (offset != 0 && recurse_check_bit(common, offset)) + length++; + cc += 1; + break; + + CASE_ITERATOR_TYPE_PRIVATE_DATA_2A +- if (PRIVATE_DATA(cc) != 0) ++ offset = PRIVATE_DATA(cc); ++ if (offset != 0 && recurse_check_bit(common, offset)) ++ { ++ SLJIT_ASSERT(recurse_check_bit(common, offset + sizeof(sljit_sw))); + length += 2; ++ } + cc += 1; + break; + + CASE_ITERATOR_TYPE_PRIVATE_DATA_2B +- if (PRIVATE_DATA(cc) != 0) ++ offset = PRIVATE_DATA(cc); ++ if (offset != 0 && recurse_check_bit(common, offset)) ++ { ++ SLJIT_ASSERT(recurse_check_bit(common, offset + sizeof(sljit_sw))); + length += 2; ++ } + cc += 1 + IMM2_SIZE; + break; + +@@ -2463,7 +2521,9 @@ while (cc < ccend) + #else + size = 1 + 32 / (int)sizeof(PCRE2_UCHAR); + #endif +- if (PRIVATE_DATA(cc) != 0) ++ ++ offset = PRIVATE_DATA(cc); ++ if (offset != 0 && recurse_check_bit(common, offset)) + length += get_class_iterator_size(cc + size); + cc += size; + break; +@@ -2498,8 +2558,7 @@ while (cc < ccend) + case OP_THEN: + SLJIT_ASSERT(common->control_head_ptr != 0); + quit_found = TRUE; +- if (!control_head_found) +- control_head_found = TRUE; ++ control_head_found = TRUE; + cc++; + break; + +@@ -2519,8 +2578,6 @@ SLJIT_ASSERT(cc == ccend); + + if (control_head_found) + length++; +-if (capture_last_found) +- length++; + if (quit_found) + { + if (setsom_found) +@@ -2553,14 +2610,12 @@ sljit_sw shared_srcw[3]; + sljit_sw kept_shared_srcw[2]; + int private_count, shared_count, kept_shared_count; + int from_sp, base_reg, offset, i; +-BOOL setsom_found = FALSE; +-BOOL setmark_found = FALSE; +-BOOL capture_last_found = FALSE; +-BOOL control_head_found = FALSE; ++ ++memset(common->recurse_bitset, 0, common->recurse_bitset_size); + + #if defined DEBUG_FORCE_CONTROL_HEAD && DEBUG_FORCE_CONTROL_HEAD + SLJIT_ASSERT(common->control_head_ptr != 0); +-control_head_found = TRUE; ++recurse_check_bit(common, common->control_head_ptr); + #endif + + switch (type) +@@ -2648,11 +2703,10 @@ while (cc < ccend) + { + case OP_SET_SOM: + SLJIT_ASSERT(common->has_set_som); +- if (has_quit && !setsom_found) ++ if (has_quit && recurse_check_bit(common, OVECTOR(0))) + { + kept_shared_srcw[0] = OVECTOR(0); + kept_shared_count = 1; +- setsom_found = TRUE; + } + cc += 1; + break; +@@ -2660,33 +2714,31 @@ while (cc < ccend) + case OP_RECURSE: + if (has_quit) + { +- if (common->has_set_som && !setsom_found) ++ if (common->has_set_som && recurse_check_bit(common, OVECTOR(0))) + { + kept_shared_srcw[0] = OVECTOR(0); + kept_shared_count = 1; +- setsom_found = TRUE; + } +- if (common->mark_ptr != 0 && !setmark_found) ++ if (common->mark_ptr != 0 && recurse_check_bit(common, common->mark_ptr)) + { + kept_shared_srcw[kept_shared_count] = common->mark_ptr; + kept_shared_count++; +- setmark_found = TRUE; + } + } +- if (common->capture_last_ptr != 0 && !capture_last_found) ++ if (common->capture_last_ptr != 0 && recurse_check_bit(common, common->capture_last_ptr)) + { + shared_srcw[0] = common->capture_last_ptr; + shared_count = 1; +- capture_last_found = TRUE; + } + cc += 1 + LINK_SIZE; + break; + + case OP_KET: +- if (PRIVATE_DATA(cc) != 0) ++ private_srcw[0] = PRIVATE_DATA(cc); ++ if (private_srcw[0] != 0) + { +- private_count = 1; +- private_srcw[0] = PRIVATE_DATA(cc); ++ if (recurse_check_bit(common, private_srcw[0])) ++ private_count = 1; + SLJIT_ASSERT(PRIVATE_DATA(cc + 1) != 0); + cc += PRIVATE_DATA(cc + 1); + } +@@ -2705,50 +2757,66 @@ while (cc < ccend) + case OP_SBRA: + case OP_SBRAPOS: + case OP_SCOND: +- private_count = 1; + private_srcw[0] = PRIVATE_DATA(cc); ++ if (recurse_check_bit(common, private_srcw[0])) ++ private_count = 1; + cc += 1 + LINK_SIZE; + break; + + case OP_CBRA: + case OP_SCBRA: +- offset = (GET2(cc, 1 + LINK_SIZE)) << 1; +- shared_srcw[0] = OVECTOR(offset); +- shared_srcw[1] = OVECTOR(offset + 1); +- shared_count = 2; ++ offset = GET2(cc, 1 + LINK_SIZE); ++ shared_srcw[0] = OVECTOR(offset << 1); ++ if (recurse_check_bit(common, shared_srcw[0])) ++ { ++ shared_srcw[1] = shared_srcw[0] + sizeof(sljit_sw); ++ SLJIT_ASSERT(recurse_check_bit(common, shared_srcw[1])); ++ shared_count = 2; ++ } + +- if (common->capture_last_ptr != 0 && !capture_last_found) ++ if (common->capture_last_ptr != 0 && recurse_check_bit(common, common->capture_last_ptr)) + { +- shared_srcw[2] = common->capture_last_ptr; +- shared_count = 3; +- capture_last_found = TRUE; ++ shared_srcw[shared_count] = common->capture_last_ptr; ++ shared_count++; + } + +- if (common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] == 0) ++ if (common->optimized_cbracket[offset] == 0) + { +- private_count = 1; +- private_srcw[0] = OVECTOR_PRIV(GET2(cc, 1 + LINK_SIZE)); ++ private_srcw[0] = OVECTOR_PRIV(offset); ++ if (recurse_check_bit(common, private_srcw[0])) ++ private_count = 1; + } ++ + cc += 1 + LINK_SIZE + IMM2_SIZE; + break; + + case OP_CBRAPOS: + case OP_SCBRAPOS: +- offset = (GET2(cc, 1 + LINK_SIZE)) << 1; +- shared_srcw[0] = OVECTOR(offset); +- shared_srcw[1] = OVECTOR(offset + 1); +- shared_count = 2; ++ offset = GET2(cc, 1 + LINK_SIZE); ++ shared_srcw[0] = OVECTOR(offset << 1); ++ if (recurse_check_bit(common, shared_srcw[0])) ++ { ++ shared_srcw[1] = shared_srcw[0] + sizeof(sljit_sw); ++ SLJIT_ASSERT(recurse_check_bit(common, shared_srcw[1])); ++ shared_count = 2; ++ } + +- if (common->capture_last_ptr != 0 && !capture_last_found) ++ if (common->capture_last_ptr != 0 && recurse_check_bit(common, common->capture_last_ptr)) + { +- shared_srcw[2] = common->capture_last_ptr; +- shared_count = 3; +- capture_last_found = TRUE; ++ shared_srcw[shared_count] = common->capture_last_ptr; ++ shared_count++; + } + +- private_count = 2; + private_srcw[0] = PRIVATE_DATA(cc); +- private_srcw[1] = OVECTOR_PRIV(GET2(cc, 1 + LINK_SIZE)); ++ if (recurse_check_bit(common, private_srcw[0])) ++ private_count = 1; ++ ++ offset = OVECTOR_PRIV(offset); ++ if (recurse_check_bit(common, offset)) ++ { ++ private_srcw[private_count] = offset; ++ private_count++; ++ } + cc += 1 + LINK_SIZE + IMM2_SIZE; + break; + +@@ -2757,18 +2825,17 @@ while (cc < ccend) + alternative = cc + GET(cc, 1); + if (*alternative == OP_KETRMAX || *alternative == OP_KETRMIN) + { +- private_count = 1; + private_srcw[0] = PRIVATE_DATA(cc); ++ if (recurse_check_bit(common, private_srcw[0])) ++ private_count = 1; + } + cc += 1 + LINK_SIZE; + break; + + CASE_ITERATOR_PRIVATE_DATA_1 +- if (PRIVATE_DATA(cc)) +- { ++ private_srcw[0] = PRIVATE_DATA(cc); ++ if (private_srcw[0] != 0 && recurse_check_bit(common, private_srcw[0])) + private_count = 1; +- private_srcw[0] = PRIVATE_DATA(cc); +- } + cc += 2; + #ifdef SUPPORT_UNICODE + if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]); +@@ -2776,11 +2843,12 @@ while (cc < ccend) + break; + + CASE_ITERATOR_PRIVATE_DATA_2A +- if (PRIVATE_DATA(cc)) ++ private_srcw[0] = PRIVATE_DATA(cc); ++ if (private_srcw[0] != 0 && recurse_check_bit(common, private_srcw[0])) + { + private_count = 2; +- private_srcw[0] = PRIVATE_DATA(cc); +- private_srcw[1] = PRIVATE_DATA(cc) + sizeof(sljit_sw); ++ private_srcw[1] = private_srcw[0] + sizeof(sljit_sw); ++ SLJIT_ASSERT(recurse_check_bit(common, private_srcw[1])); + } + cc += 2; + #ifdef SUPPORT_UNICODE +@@ -2789,11 +2857,12 @@ while (cc < ccend) + break; + + CASE_ITERATOR_PRIVATE_DATA_2B +- if (PRIVATE_DATA(cc)) ++ private_srcw[0] = PRIVATE_DATA(cc); ++ if (private_srcw[0] != 0 && recurse_check_bit(common, private_srcw[0])) + { + private_count = 2; +- private_srcw[0] = PRIVATE_DATA(cc); +- private_srcw[1] = PRIVATE_DATA(cc) + sizeof(sljit_sw); ++ private_srcw[1] = private_srcw[0] + sizeof(sljit_sw); ++ SLJIT_ASSERT(recurse_check_bit(common, private_srcw[1])); + } + cc += 2 + IMM2_SIZE; + #ifdef SUPPORT_UNICODE +@@ -2802,30 +2871,30 @@ while (cc < ccend) + break; + + CASE_ITERATOR_TYPE_PRIVATE_DATA_1 +- if (PRIVATE_DATA(cc)) +- { ++ private_srcw[0] = PRIVATE_DATA(cc); ++ if (private_srcw[0] != 0 && recurse_check_bit(common, private_srcw[0])) + private_count = 1; +- private_srcw[0] = PRIVATE_DATA(cc); +- } + cc += 1; + break; + + CASE_ITERATOR_TYPE_PRIVATE_DATA_2A +- if (PRIVATE_DATA(cc)) ++ private_srcw[0] = PRIVATE_DATA(cc); ++ if (private_srcw[0] != 0 && recurse_check_bit(common, private_srcw[0])) + { + private_count = 2; +- private_srcw[0] = PRIVATE_DATA(cc); + private_srcw[1] = private_srcw[0] + sizeof(sljit_sw); ++ SLJIT_ASSERT(recurse_check_bit(common, private_srcw[1])); + } + cc += 1; + break; + + CASE_ITERATOR_TYPE_PRIVATE_DATA_2B +- if (PRIVATE_DATA(cc)) ++ private_srcw[0] = PRIVATE_DATA(cc); ++ if (private_srcw[0] != 0 && recurse_check_bit(common, private_srcw[0])) + { + private_count = 2; +- private_srcw[0] = PRIVATE_DATA(cc); + private_srcw[1] = private_srcw[0] + sizeof(sljit_sw); ++ SLJIT_ASSERT(recurse_check_bit(common, private_srcw[1])); + } + cc += 1 + IMM2_SIZE; + break; +@@ -2842,14 +2911,17 @@ while (cc < ccend) + switch(get_class_iterator_size(cc + i)) + { + case 1: +- private_count = 1; + private_srcw[0] = PRIVATE_DATA(cc); + break; + + case 2: +- private_count = 2; + private_srcw[0] = PRIVATE_DATA(cc); +- private_srcw[1] = private_srcw[0] + sizeof(sljit_sw); ++ if (recurse_check_bit(common, private_srcw[0])) ++ { ++ private_count = 2; ++ private_srcw[1] = private_srcw[0] + sizeof(sljit_sw); ++ SLJIT_ASSERT(recurse_check_bit(common, private_srcw[1])); ++ } + break; + + default: +@@ -2864,28 +2936,25 @@ while (cc < ccend) + case OP_PRUNE_ARG: + case OP_THEN_ARG: + SLJIT_ASSERT(common->mark_ptr != 0); +- if (has_quit && !setmark_found) ++ if (has_quit && recurse_check_bit(common, common->mark_ptr)) + { + kept_shared_srcw[0] = common->mark_ptr; + kept_shared_count = 1; +- setmark_found = TRUE; + } +- if (common->control_head_ptr != 0 && !control_head_found) ++ if (common->control_head_ptr != 0 && recurse_check_bit(common, common->control_head_ptr)) + { + private_srcw[0] = common->control_head_ptr; + private_count = 1; +- control_head_found = TRUE; + } + cc += 1 + 2 + cc[1]; + break; + + case OP_THEN: + SLJIT_ASSERT(common->control_head_ptr != 0); +- if (!control_head_found) ++ if (recurse_check_bit(common, common->control_head_ptr)) + { + private_srcw[0] = common->control_head_ptr; + private_count = 1; +- control_head_found = TRUE; + } + cc++; + break; +@@ -2893,7 +2962,7 @@ while (cc < ccend) + default: + cc = next_opcode(common, cc); + SLJIT_ASSERT(cc != NULL); +- break; ++ continue; + } + + if (type != recurse_copy_shared_to_global && type != recurse_copy_kept_shared_to_global) +@@ -13811,7 +13880,7 @@ SLJIT_ASSERT(!(common->req_char_ptr != 0 && common->start_used_ptr != 0)); + common->cbra_ptr = OVECTOR_START + (re->top_bracket + 1) * 2 * sizeof(sljit_sw); + + total_length = ccend - common->start; +-common->private_data_ptrs = (sljit_s32 *)SLJIT_MALLOC(total_length * (sizeof(sljit_s32) + (common->has_then ? 1 : 0)), allocator_data); ++common->private_data_ptrs = (sljit_s32*)SLJIT_MALLOC(total_length * (sizeof(sljit_s32) + (common->has_then ? 1 : 0)), allocator_data); + if (!common->private_data_ptrs) + { + SLJIT_FREE(common->optimized_cbracket, allocator_data); +@@ -13852,6 +13921,7 @@ if (!compiler) + common->compiler = compiler; + + /* Main pcre2_jit_exec entry. */ ++SLJIT_ASSERT((private_data_size & (sizeof(sljit_sw) - 1)) == 0); + sljit_emit_enter(compiler, 0, SLJIT_ARGS1(W, W), 5, 5, 0, 0, private_data_size); + + /* Register init. */ +@@ -14074,20 +14144,40 @@ common->early_fail_end_ptr = 0; + common->currententry = common->entries; + common->local_quit_available = TRUE; + quit_label = common->quit_label; +-while (common->currententry != NULL) ++if (common->currententry != NULL) + { +- /* Might add new entries. */ +- compile_recurse(common); +- if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler))) ++ /* A free bit for each private data. */ ++ common->recurse_bitset_size = ((private_data_size / (int)sizeof(sljit_sw)) + 7) >> 3; ++ SLJIT_ASSERT(common->recurse_bitset_size > 0); ++ common->recurse_bitset = (sljit_u8*)SLJIT_MALLOC(common->recurse_bitset_size, allocator_data);; ++ ++ if (common->recurse_bitset != NULL) ++ { ++ do ++ { ++ /* Might add new entries. */ ++ compile_recurse(common); ++ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler))) ++ break; ++ flush_stubs(common); ++ common->currententry = common->currententry->next; ++ } ++ while (common->currententry != NULL); ++ ++ SLJIT_FREE(common->recurse_bitset, allocator_data); ++ } ++ ++ if (common->currententry != NULL) + { ++ /* The common->recurse_bitset has been freed. */ ++ SLJIT_ASSERT(sljit_get_compiler_error(compiler) || common->recurse_bitset == NULL); ++ + sljit_free_compiler(compiler); + SLJIT_FREE(common->optimized_cbracket, allocator_data); + SLJIT_FREE(common->private_data_ptrs, allocator_data); + PRIV(jit_free_rodata)(common->read_only_data_head, allocator_data); + return PCRE2_ERROR_NOMEMORY; + } +- flush_stubs(common); +- common->currententry = common->currententry->next; + } + common->local_quit_available = FALSE; + common->quit_label = quit_label; +diff --git a/src/pcre2_jit_test.c b/src/pcre2_jit_test.c +index 8450f0b6..bb141a0c 100644 +--- a/src/pcre2_jit_test.c ++++ b/src/pcre2_jit_test.c +@@ -751,6 +751,7 @@ static struct regression_test_case regression_test_cases[] = { + { MU, A, 0, 0, "((?(R)a|(?1)){1,3}?)M", "aaaM" }, + { MU, A, 0, 0, "((.)(?:.|\\2(?1))){0}#(?1)#", "#aabbccdde# #aabbccddee#" }, + { MU, A, 0, 0, "((.)(?:\\2|\\2{4}b)){0}#(?:(?1))+#", "#aaaab# #aaaaab#" }, ++ { MU, A, 0, 0 | F_NOMATCH, "(?1)$((.|\\2xx){1,2})", "abc" }, + + /* 16 bit specific tests. */ + { CM, A, 0, 0 | F_FORCECONV, "\xc3\xa1", "\xc3\x81\xc3\xa1" }, diff --git a/patches/pcre2-10.43-Avoid-LIMIT_HEAP-integer.patch b/patches/pcre2-10.43-Avoid-LIMIT_HEAP-integer.patch new file mode 100644 index 000000000..9a9d0208a --- /dev/null +++ b/patches/pcre2-10.43-Avoid-LIMIT_HEAP-integer.patch @@ -0,0 +1,137 @@ +From bfb55a6bd406ae711444915bba957b933aaa10ca Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= +Date: Tue, 17 Jan 2023 06:55:53 -0800 +Subject: [PATCH 1/2] avoid LIMIT_HEAP integer multiplication wrap around + (#184) + +Cherry-picked from 4d66adc387baa2d29f91f0cadfaf8d8e77e13bb3. + +If a LIMIT_HEAP value once converted to bytes is larger than UINT_MAX +would result in a bogus setting that could trigger a matching failure +as shown by the following: + + PCRE2 version 10.42 2022-12-11 + re> /(*LIMIT_HEAP=4194304)a/ + data> a + Failed: error -63: heap limit exceeded + +Remove the multiplication and instead keep track of the maximum heap +allowed in KB as was done originally. + +Aditionally, add a check to avoid overflowing a PCRE2_SIZE while +doubling the heap used and that could result in a crash (only on +systems with a 32-bit PCRE2_SIZE and using non standard settings). + +Unlike the original, this code avoids rounding the heapframes_size +to the frame_size at the allocation time, which simplifies the logic +and wasn't really needed. + +Fixes: d90fb23 (Refactor match_data() to always use the heap instead + of having an initial frames vector on the stack..., 2022-07-27) +Closes: #183 +--- + src/pcre2_intmodedep.h | 4 ++-- + src/pcre2_match.c | 38 +++++++++++++++++++++++++++----------- + 2 files changed, 29 insertions(+), 13 deletions(-) + +diff --git a/src/pcre2_intmodedep.h b/src/pcre2_intmodedep.h +index 390e737a..8f6487e9 100644 +--- a/src/pcre2_intmodedep.h ++++ b/src/pcre2_intmodedep.h +@@ -858,7 +858,7 @@ doing traditional NFA matching (pcre2_match() and friends). */ + + typedef struct match_block { + pcre2_memctl memctl; /* For general use */ +- PCRE2_SIZE heap_limit; /* As it says */ ++ uint32_t heap_limit; /* As it says */ + uint32_t match_limit; /* As it says */ + uint32_t match_limit_depth; /* As it says */ + uint32_t match_call_count; /* Number of times a new frame is created */ +@@ -911,7 +911,7 @@ typedef struct dfa_match_block { + PCRE2_SPTR last_used_ptr; /* Latest consulted character */ + const uint8_t *tables; /* Character tables */ + PCRE2_SIZE start_offset; /* The start offset value */ +- PCRE2_SIZE heap_limit; /* As it says */ ++ uint32_t heap_limit; /* As it says */ + PCRE2_SIZE heap_used; /* As it says */ + uint32_t match_limit; /* As it says */ + uint32_t match_limit_depth; /* As it says */ +diff --git a/src/pcre2_match.c b/src/pcre2_match.c +index 168b9fad..fa49e64a 100644 +--- a/src/pcre2_match.c ++++ b/src/pcre2_match.c +@@ -665,13 +665,28 @@ N = (heapframe *)((char *)F + frame_size); + if (N >= frames_top) + { + heapframe *new; +- PCRE2_SIZE newsize = match_data->heapframes_size * 2; ++ PCRE2_SIZE newsize; + +- if (newsize > mb->heap_limit) ++ if (match_data->heapframes_size >= PCRE2_SIZE_MAX / 2) + { +- PCRE2_SIZE maxsize = (mb->heap_limit/frame_size) * frame_size; +- if (match_data->heapframes_size >= maxsize) return PCRE2_ERROR_HEAPLIMIT; +- newsize = maxsize; ++ if (match_data->heapframes_size == PCRE2_SIZE_MAX - 1) ++ return PCRE2_ERROR_NOMEMORY; ++ newsize = PCRE2_SIZE_MAX - 1; ++ } ++ else ++ newsize = match_data->heapframes_size * 2; ++ ++ if (newsize / 1024 >= mb->heap_limit) ++ { ++ PCRE2_SIZE old_size = match_data->heapframes_size / 1024; ++ if (mb->heap_limit <= old_size) return PCRE2_ERROR_HEAPLIMIT; ++ else ++ { ++ PCRE2_SIZE max_delta = 1024 * (mb->heap_limit - old_size); ++ int over_bytes = match_data->heapframes_size % 1024; ++ if (over_bytes) max_delta -= (1024 - over_bytes); ++ newsize = match_data->heapframes_size + max_delta; ++ } + } + + new = match_data->memctl.malloc(newsize, match_data->memctl.memory_data); +@@ -6801,7 +6816,7 @@ the pattern. It is not used at all if there are no capturing parentheses. + + frame_size is the total size of each frame + match_data->heapframes is the pointer to the frames vector +- match_data->heapframes_size is the total size of the vector ++ match_data->heapframes_size is the allocated size of the vector + + We must pad the frame_size for alignment to ensure subsequent frames are as + aligned as heapframe. Whilst ovector is word-aligned due to being a PCRE2_SIZE +@@ -6816,7 +6831,7 @@ frame_size = (offsetof(heapframe, ovector) + + smaller. */ + + mb->heap_limit = ((mcontext->heap_limit < re->limit_heap)? +- mcontext->heap_limit : re->limit_heap) * 1024; ++ mcontext->heap_limit : re->limit_heap); + + mb->match_limit = (mcontext->match_limit < re->limit_match)? + mcontext->match_limit : re->limit_match; +@@ -6832,14 +6847,15 @@ the size to a multiple of the frame size. */ + + heapframes_size = frame_size * 10; + if (heapframes_size < START_FRAMES_SIZE) heapframes_size = START_FRAMES_SIZE; +-if (heapframes_size > mb->heap_limit) ++if (heapframes_size / 1024 > mb->heap_limit) + { +- if (frame_size > mb->heap_limit ) return PCRE2_ERROR_HEAPLIMIT; +- heapframes_size = mb->heap_limit; ++ PCRE2_SIZE max_size = 1024 * mb->heap_limit; ++ if (max_size < frame_size) return PCRE2_ERROR_HEAPLIMIT; ++ heapframes_size = max_size; + } + + /* If an existing frame vector in the match_data block is large enough, we can +-use it.Otherwise, free any pre-existing vector and get a new one. */ ++use it. Otherwise, free any pre-existing vector and get a new one. */ + + if (match_data->heapframes_size < heapframes_size) + { +-- +2.51.2.vfs.0.0 + diff --git a/patches/pcre2-10.43-Fix-heapframe-overflow.patch b/patches/pcre2-10.43-Fix-heapframe-overflow.patch new file mode 100644 index 000000000..e5d59485e --- /dev/null +++ b/patches/pcre2-10.43-Fix-heapframe-overflow.patch @@ -0,0 +1,160 @@ +From ba0a3ff395d99ab2fe7ee76f96c97736294298c6 Mon Sep 17 00:00:00 2001 +From: Philip Hazel +Date: Fri, 18 Aug 2023 17:40:16 +0100 +Subject: [PATCH 2/2] Fix issue #275 + +Cherry-picked from 803a64f6151a2d43a44a2377956ae36408c96986. +--- + src/pcre2_match.c | 32 +++++++++++++++----------------- + testdata/testinput15 | 7 ++++++- + testdata/testoutput15 | 8 +++++++- + 3 files changed, 28 insertions(+), 19 deletions(-) + +diff --git a/src/pcre2_match.c b/src/pcre2_match.c +index fa49e64a..8d3c796e 100644 +--- a/src/pcre2_match.c ++++ b/src/pcre2_match.c +@@ -597,7 +597,6 @@ heapframe *P = NULL; + + heapframe *frames_top; /* End of frames vector */ + heapframe *assert_accept_frame = NULL; /* For passing back a frame with captures */ +-PCRE2_SIZE heapframes_size; /* Usable size of frames vector */ + PCRE2_SIZE frame_copy_size; /* Amount to copy when creating a new frame */ + + /* Local variables that do not need to be preserved over calls to RRMATCH(). */ +@@ -635,13 +634,10 @@ copied when a new frame is created. */ + + frame_copy_size = frame_size - offsetof(heapframe, eptr); + +-/* Set up the first frame and the end of the frames vector. We set the local +-heapframes_size to the usuable amount of the vector, that is, a whole number of +-frames. */ ++/* Set up the first frame and the end of the frames vector. */ + + F = match_data->heapframes; +-heapframes_size = (match_data->heapframes_size / frame_size) * frame_size; +-frames_top = (heapframe *)((char *)F + heapframes_size); ++frames_top = (heapframe *)((char *)F + match_data->heapframes_size); + + Frdepth = 0; /* "Recursion" depth */ + Fcapture_last = 0; /* Number of most recent capture */ +@@ -662,10 +658,11 @@ MATCH_RECURSE: + doubling the size, but constrained by the heap limit (which is in KiB). */ + + N = (heapframe *)((char *)F + frame_size); +-if (N >= frames_top) ++if ((heapframe *)((char *)N + frame_size) >= frames_top) + { + heapframe *new; + PCRE2_SIZE newsize; ++ PCRE2_SIZE usedsize = (char *)N - (char *)(match_data->heapframes); + + if (match_data->heapframes_size >= PCRE2_SIZE_MAX / 2) + { +@@ -679,7 +676,8 @@ if (N >= frames_top) + if (newsize / 1024 >= mb->heap_limit) + { + PCRE2_SIZE old_size = match_data->heapframes_size / 1024; +- if (mb->heap_limit <= old_size) return PCRE2_ERROR_HEAPLIMIT; ++ if (mb->heap_limit <= old_size) ++ return PCRE2_ERROR_HEAPLIMIT; + else + { + PCRE2_SIZE max_delta = 1024 * (mb->heap_limit - old_size); +@@ -689,19 +687,21 @@ if (N >= frames_top) + } + } + ++ /* With a heap limit set, the permitted additional size may not be enough for ++ another frame, so do a final check. */ ++ ++ if (newsize - usedsize < frame_size) return PCRE2_ERROR_HEAPLIMIT; + new = match_data->memctl.malloc(newsize, match_data->memctl.memory_data); + if (new == NULL) return PCRE2_ERROR_NOMEMORY; +- memcpy(new, match_data->heapframes, heapframes_size); ++ memcpy(new, match_data->heapframes, usedsize); + +- F = (heapframe *)((char *)new + ((char *)F - (char *)match_data->heapframes)); +- N = (heapframe *)((char *)F + frame_size); ++ N = (heapframe *)((char *)new + usedsize); ++ F = (heapframe *)((char *)N - frame_size); + + match_data->memctl.free(match_data->heapframes, match_data->memctl.memory_data); + match_data->heapframes = new; + match_data->heapframes_size = newsize; +- +- heapframes_size = (newsize / frame_size) * frame_size; +- frames_top = (heapframe *)((char *)new + heapframes_size); ++ frames_top = (heapframe *)((char *)new + newsize); + } + + #ifdef DEBUG_SHOW_RMATCH +@@ -6842,8 +6842,7 @@ mb->match_limit_depth = (mcontext->depth_limit < re->limit_depth)? + /* If a pattern has very many capturing parentheses, the frame size may be very + large. Set the initial frame vector size to ensure that there are at least 10 + available frames, but enforce a minimum of START_FRAMES_SIZE. If this is +-greater than the heap limit, get as large a vector as possible. Always round +-the size to a multiple of the frame size. */ ++greater than the heap limit, get as large a vector as possible. */ + + heapframes_size = frame_size * 10; + if (heapframes_size < START_FRAMES_SIZE) heapframes_size = START_FRAMES_SIZE; +@@ -7301,7 +7300,6 @@ for(;;) + mb->match_call_count = 0; + mb->end_offset_top = 0; + mb->skip_arg_count = 0; +- + rc = match(start_match, mb->start_code, re->top_bracket, frame_size, + match_data, mb); + +diff --git a/testdata/testinput15 b/testdata/testinput15 +index 22d739bc..61fff2cc 100644 +--- a/testdata/testinput15 ++++ b/testdata/testinput15 +@@ -6,12 +6,17 @@ + + # (2) Other tests that must not be run with JIT. + +-# This test is first so that it doesn't inherit a large enough heap frame ++# These tests are first so that they don't inherit a large enough heap frame + # vector from a previous test. + + /(*LIMIT_HEAP=21)\[(a)]{60}/expand + \[a]{60} + ++"(*LIMIT_HEAP=21)()((?))()()()()()()()()()()()()()()()()()()()()()()()(())()()()()()()()()()()()()()()()()()()()()()(())()()()()()()()()()()()()()" ++ xx ++ ++# ----------------------------------------------------------------------- ++ + /(a+)*zz/I + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\=find_limits_noheap + aaaaaaaaaaaaaz\=find_limits_noheap +diff --git a/testdata/testoutput15 b/testdata/testoutput15 +index af0d7c2a..be7afd0f 100644 +--- a/testdata/testoutput15 ++++ b/testdata/testoutput15 +@@ -6,13 +6,19 @@ + + # (2) Other tests that must not be run with JIT. + +-# This test is first so that it doesn't inherit a large enough heap frame ++# These tests are first so that they don't inherit a large enough heap frame + # vector from a previous test. + + /(*LIMIT_HEAP=21)\[(a)]{60}/expand + \[a]{60} + Failed: error -63: heap limit exceeded + ++"(*LIMIT_HEAP=21)()((?))()()()()()()()()()()()()()()()()()()()()()()()(())()()()()()()()()()()()()()()()()()()()()()(())()()()()()()()()()()()()()" ++ xx ++Failed: error -63: heap limit exceeded ++ ++# ----------------------------------------------------------------------- ++ + /(a+)*zz/I + Capture group count = 1 + Starting code units: a z +-- +2.51.2.vfs.0.0 + diff --git a/patches/pcre2-10.44-Fix-incorrect-compiling.patch b/patches/pcre2-10.44-Fix-incorrect-compiling.patch new file mode 100644 index 000000000..6b951f99b --- /dev/null +++ b/patches/pcre2-10.44-Fix-incorrect-compiling.patch @@ -0,0 +1,64 @@ +From 0d7159ca52771daa8b5cafc422b6c140aa7a11d7 Mon Sep 17 00:00:00 2001 +From: Philip Hazel +Date: Fri, 1 Mar 2024 17:23:34 +0000 +Subject: [PATCH] Fix incorrect compiling when variable-length lookbehind's + first branch was not the shortest and there was a backreference to a + groupwithin the lookbehind. + +Cherry-picked from 4a6a8b056f39079d5e958eac84c2ad173f4680bc. +--- + src/pcre2_compile.c | 2 +- + testdata/testinput2 | 4 ++++ + testdata/testoutput2 | 10 ++++++++++ + 3 files changed, 15 insertions(+), 1 deletion(-) + +diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c +index 8b364977..71c2dbca 100644 +--- a/src/pcre2_compile.c ++++ b/src/pcre2_compile.c +@@ -9908,7 +9908,7 @@ do + *bptr |= branchlength; /* branchlength never more than 65535 */ + bptr = *pptrptr; + } +-while (*bptr == META_ALT); ++while (META_CODE(*bptr) == META_ALT); + + /* If any branch is of variable length, the whole lookbehind is of variable + length. If the maximum length of any branch exceeds the maximum for variable +diff --git a/testdata/testinput2 b/testdata/testinput2 +index 97608542..9b4c0684 100644 +--- a/testdata/testinput2 ++++ b/testdata/testinput2 +@@ -6099,4 +6099,8 @@ a)"xI + /(a(?1)z||(?1)++)$/ + abcd\=disable_recurseloop_check + ++/(((?<=123?456456|ABC)))(?<=\2)../ ++ ABCDEFG ++ 12345645678910 ++ + # End of testinput2 +diff --git a/testdata/testoutput2 b/testdata/testoutput2 +index ee1f70b0..30c5a83e 100644 +--- a/testdata/testoutput2 ++++ b/testdata/testoutput2 +@@ -18038,6 +18038,16 @@ Failed: error -47: match limit exceeded + 0: + 1: + ++/(((?<=123?456456|ABC)))(?<=\2)../ ++ ABCDEFG ++ 0: DE ++ 1: ++ 2: ++ 12345645678910 ++ 0: 78 ++ 1: ++ 2: ++ + # End of testinput2 + Error -70: PCRE2_ERROR_BADDATA (unknown error number) + Error -62: bad serialized data +-- +2.51.2.vfs.0.0 + diff --git a/patches/pcre2-10.44-Fix-locking-region.patch b/patches/pcre2-10.44-Fix-locking-region.patch new file mode 100644 index 000000000..39c1fb0d3 --- /dev/null +++ b/patches/pcre2-10.44-Fix-locking-region.patch @@ -0,0 +1,38 @@ +From c0fdb5f7013ecc10292ed9e697b3fe901e38cd77 Mon Sep 17 00:00:00 2001 +From: lbonn +Date: Tue, 2 Apr 2024 12:55:33 +0200 +Subject: [PATCH] Fix locking region in sjlit_malloc_exec + +Cherry-picked from ad89dd8ecd25589d236bd20b36f2abf69f938fd1 +(https://github.com/zherczeg/sljit.git) + +The locked section needs to extend until we are done modifying internal +block offsets and sizes, otherwise we risk running into data corruption +in a multi-threaded context. + +This bug was introduced in 7de0fee9a7376b33e31a3903487cd9933da3a606 +--- + src/sljit/allocator_src/sljitExecAllocatorCore.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/sljit/allocator_src/sljitExecAllocatorCore.c b/src/sljit/allocator_src/sljitExecAllocatorCore.c +index 6cd39110..4ef39c17 100644 +--- a/src/sljit/allocator_src/sljitExecAllocatorCore.c ++++ b/src/sljit/allocator_src/sljitExecAllocatorCore.c +@@ -237,12 +237,12 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_malloc_exec(sljit_uw size) + header->size = chunk_size; + next_header = AS_BLOCK_HEADER(header, chunk_size); + } +- SLJIT_ALLOCATOR_UNLOCK(); + next_header->size = 1; + next_header->prev_size = chunk_size; + #ifdef SLJIT_HAS_EXECUTABLE_OFFSET + next_header->executable_offset = executable_offset; + #endif /* SLJIT_HAS_EXECUTABLE_OFFSET */ ++ SLJIT_ALLOCATOR_UNLOCK(); + return MEM_START(header); + } + +-- +2.51.2.vfs.0.0 + diff --git a/patches/pcre2-10.45-Memory-reports-only-compiled.patch b/patches/pcre2-10.45-Memory-reports-only-compiled.patch new file mode 100644 index 000000000..933808827 --- /dev/null +++ b/patches/pcre2-10.45-Memory-reports-only-compiled.patch @@ -0,0 +1,5228 @@ +From e669b61ecf6ae3af2a4f0c714c6723ccc073ecd5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= +Date: Sun, 9 Jun 2024 08:22:15 -0700 +Subject: [PATCH] pcre2test: memory reports only compiled memory usage for + code/data (#418) + +Cherry-pick of 57906628d7babd27c01eb1c085d3e0cdd512189a. + +Since 05aafb2 (Implement pcre2_set_max_pattern_compiled_length() and set +this limit in the fuzzer, 2024-04-24), the memory modifier has reported +the full size of the allocated "code" returned by `pcre2_compile`. + +Problem is that the size of the structure used to hold that in memory also +depends on the platform ABI and even alignment by the compiler, and has +been therefore fragile to compare. + +Revert to reporting only the additional memory that `pcre2_compile()` will +use for the compiled pattern (including any data tables) and make sure +that the limit provided with `pcre2_set_max_pattern_compiled_length()` +also avoid the internal struct overhead. + +Fixes: #415 +--- + doc/pcre2_set_max_pattern_compiled_length.3 | 8 +- + src/pcre2_compile.c | 4 +- + src/pcre2test.c | 17 +- + testdata/testoutput8-16-2 | 171 +++++++------------- + testdata/testoutput8-16-3 | 171 +++++++------------- + testdata/testoutput8-16-4 | 171 +++++++------------- + testdata/testoutput8-32-2 | 171 +++++++------------- + testdata/testoutput8-32-3 | 171 +++++++------------- + testdata/testoutput8-32-4 | 171 +++++++------------- + testdata/testoutput8-8-2 | 171 +++++++------------- + testdata/testoutput8-8-3 | 171 +++++++------------- + testdata/testoutput8-8-4 | 171 +++++++------------- + 12 files changed, 546 insertions(+), 1022 deletions(-) + +diff --git a/doc/pcre2_set_max_pattern_compiled_length.3 b/doc/pcre2_set_max_pattern_compiled_length.3 +index 472a7bbd..679c12c2 100644 +--- a/doc/pcre2_set_max_pattern_compiled_length.3 ++++ b/doc/pcre2_set_max_pattern_compiled_length.3 +@@ -1,4 +1,4 @@ +-.TH PCRE2_SET_MAX_PATTERN_COMPILED_LENGTH 3 "24 April 2024" "PCRE2 10.44" ++.TH PCRE2_SET_MAX_PATTERN_COMPILED_LENGTH 3 "8 Jun 2024" "PCRE2 10.45" + .SH NAME + PCRE2 - Perl-compatible regular expressions (revised API) + .SH SYNOPSIS +@@ -15,9 +15,9 @@ PCRE2 - Perl-compatible regular expressions (revised API) + .rs + .sp + This function sets, in a compile context, the maximum size (in bytes) for the +-memory needed to hold the compiled version of a pattern that is compiled with +-this context. The result is always zero. If a pattern that is passed to +-\fBpcre2_compile()\fP with this context needs more memory, an error is ++memory needed to hold the compiled version of a pattern that is using this ++context. The result is always zero. If a pattern that is passed to ++\fBpcre2_compile()\fP referencing this context needs more memory, an error is + generated. The default is the largest number that a PCRE2_SIZE variable can + hold, which is effectively unlimited. + .P +diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c +index 8e6787ab..cc5b9674 100644 +--- a/src/pcre2_compile.c ++++ b/src/pcre2_compile.c +@@ -10608,8 +10608,7 @@ block for storing the compiled pattern and names table. Integer overflow should + no longer be possible because nowadays we limit the maximum value of + cb.names_found and cb.name_entry_size. */ + +-re_blocksize = sizeof(pcre2_real_code) + +- CU2BYTES(length + ++re_blocksize = CU2BYTES(length + + (PCRE2_SIZE)cb.names_found * (PCRE2_SIZE)cb.name_entry_size); + + if (re_blocksize > ccontext->max_pattern_compiled_length) +@@ -10618,6 +10617,7 @@ if (re_blocksize > ccontext->max_pattern_compiled_length) + goto HAD_CB_ERROR; + } + ++re_blocksize += sizeof(pcre2_real_code); + re = (pcre2_real_code *) + ccontext->memctl.malloc(re_blocksize, ccontext->memctl.memory_data); + if (re == NULL) +diff --git a/src/pcre2test.c b/src/pcre2test.c +index 37903451..550ae4e4 100644 +--- a/src/pcre2test.c ++++ b/src/pcre2test.c +@@ -4397,7 +4397,7 @@ static void + show_memory_info(void) + { + uint32_t name_count, name_entry_size; +-PCRE2_SIZE size, cblock_size; ++PCRE2_SIZE size, cblock_size, data_size; + + /* One of the test_mode values will always be true, but to stop a compiler + warning we must initialize cblock_size. */ +@@ -4417,18 +4417,19 @@ if (test_mode == PCRE32_MODE) cblock_size = sizeof(pcre2_real_code_32); + (void)pattern_info(PCRE2_INFO_NAMECOUNT, &name_count, FALSE); + (void)pattern_info(PCRE2_INFO_NAMEENTRYSIZE, &name_entry_size, FALSE); + +-/* The uint32_t variables are cast before multiplying to stop code analyzers +-grumbling about potential overflow. */ ++/* The uint32_t variables are cast before multiplying to avoid potential ++ integer overflow. */ ++data_size = (PCRE2_SIZE)name_count * (PCRE2_SIZE)name_entry_size * (PCRE2_SIZE)code_unit_size; + +-fprintf(outfile, "Memory allocation - compiled block : %" SIZ_FORM "\n", size); +-fprintf(outfile, "Memory allocation - code portion : %" SIZ_FORM "\n", size - +- (PCRE2_SIZE)name_count * (PCRE2_SIZE)name_entry_size * (PCRE2_SIZE)code_unit_size - +- cblock_size); ++fprintf(outfile, "Memory allocation - code size : %" SIZ_FORM "\n", size - ++ cblock_size - data_size); ++if (data_size != 0) ++ fprintf(outfile, "Memory allocation - data size : %" SIZ_FORM "\n", data_size); + + if (pat_patctl.jit != 0) + { + (void)pattern_info(PCRE2_INFO_JITSIZE, &size, FALSE); +- fprintf(outfile, "Memory allocation - JIT code : %" SIZ_FORM "\n", size); ++ fprintf(outfile, "Memory allocation - JIT code : %" SIZ_FORM "\n", size); + } + } + +diff --git a/testdata/testoutput8-16-2 b/testdata/testoutput8-16-2 +index bcb9e177..108c0bea 100644 +--- a/testdata/testoutput8-16-2 ++++ b/testdata/testoutput8-16-2 +@@ -10,8 +10,7 @@ + #pattern fullbincode,memory + + /((?i)b)/ +-Memory allocation - compiled block : 160 +-Memory allocation - code portion : 24 ++Memory allocation - code size : 24 + ------------------------------------------------------------------ + 0 9 Bra + 2 5 CBra 1 +@@ -22,8 +21,7 @@ Memory allocation - code portion : 24 + ------------------------------------------------------------------ + + /(?s)(.*X|^B)/ +-Memory allocation - compiled block : 174 +-Memory allocation - code portion : 38 ++Memory allocation - code size : 38 + ------------------------------------------------------------------ + 0 16 Bra + 2 7 CBra 1 +@@ -38,8 +36,7 @@ Memory allocation - code portion : 38 + ------------------------------------------------------------------ + + /(?s:.*X|^B)/ +-Memory allocation - compiled block : 172 +-Memory allocation - code portion : 36 ++Memory allocation - code size : 36 + ------------------------------------------------------------------ + 0 15 Bra + 2 6 Bra +@@ -54,8 +51,7 @@ Memory allocation - code portion : 36 + ------------------------------------------------------------------ + + /^[[:alnum:]]/ +-Memory allocation - compiled block : 182 +-Memory allocation - code portion : 46 ++Memory allocation - code size : 46 + ------------------------------------------------------------------ + 0 20 Bra + 2 ^ +@@ -65,8 +61,7 @@ Memory allocation - code portion : 46 + ------------------------------------------------------------------ + + /#/Ix +-Memory allocation - compiled block : 146 +-Memory allocation - code portion : 10 ++Memory allocation - code size : 10 + ------------------------------------------------------------------ + 0 2 Bra + 2 2 Ket +@@ -78,8 +73,7 @@ Options: extended + Subject length lower bound = 0 + + /a#/Ix +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 4 Bra + 2 a +@@ -92,8 +86,7 @@ First code unit = 'a' + Subject length lower bound = 1 + + /x?+/ +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 4 Bra + 2 x?+ +@@ -102,8 +95,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /x++/ +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 4 Bra + 2 x++ +@@ -112,8 +104,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /x{1,3}+/ +-Memory allocation - compiled block : 156 +-Memory allocation - code portion : 20 ++Memory allocation - code size : 20 + ------------------------------------------------------------------ + 0 7 Bra + 2 x +@@ -123,8 +114,7 @@ Memory allocation - code portion : 20 + ------------------------------------------------------------------ + + /(x)*+/ +-Memory allocation - compiled block : 162 +-Memory allocation - code portion : 26 ++Memory allocation - code size : 26 + ------------------------------------------------------------------ + 0 10 Bra + 2 Braposzero +@@ -136,8 +126,7 @@ Memory allocation - code portion : 26 + ------------------------------------------------------------------ + + /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/ +-Memory allocation - compiled block : 278 +-Memory allocation - code portion : 142 ++Memory allocation - code size : 142 + ------------------------------------------------------------------ + 0 68 Bra + 2 ^ +@@ -160,8 +149,7 @@ Memory allocation - code portion : 142 + ------------------------------------------------------------------ + + "8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b" +-Memory allocation - compiled block : 1784 +-Memory allocation - code portion : 1648 ++Memory allocation - code size : 1648 + ------------------------------------------------------------------ + 0 821 Bra + 2 8J$WE<.rX+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDDqmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X +@@ -171,8 +159,7 @@ Memory allocation - code portion : 1648 + ------------------------------------------------------------------ + + "\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b" +-Memory allocation - compiled block : 1764 +-Memory allocation - code portion : 1628 ++Memory allocation - code size : 1628 + ------------------------------------------------------------------ + 0 811 Bra + 2 $<.X+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDDqmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X +@@ -182,8 +169,7 @@ Memory allocation - code portion : 1628 + ------------------------------------------------------------------ + + /(a(?1)b)/ +-Memory allocation - compiled block : 168 +-Memory allocation - code portion : 32 ++Memory allocation - code size : 32 + ------------------------------------------------------------------ + 0 13 Bra + 2 9 CBra 1 +@@ -196,8 +182,7 @@ Memory allocation - code portion : 32 + ------------------------------------------------------------------ + + /(a(?1)+b)/ +-Memory allocation - compiled block : 176 +-Memory allocation - code portion : 40 ++Memory allocation - code size : 40 + ------------------------------------------------------------------ + 0 17 Bra + 2 13 CBra 1 +@@ -212,8 +197,8 @@ Memory allocation - code portion : 40 + ------------------------------------------------------------------ + + /a(?Pb|c)d(?Pe)/ +-Memory allocation - compiled block : 242 +-Memory allocation - code portion : 54 ++Memory allocation - code size : 54 ++Memory allocation - data size : 52 + ------------------------------------------------------------------ + 0 24 Bra + 2 a +@@ -231,8 +216,8 @@ Memory allocation - code portion : 54 + ------------------------------------------------------------------ + + /(?:a(?Pc(?Pd)))(?Pa)/ +-Memory allocation - compiled block : 218 +-Memory allocation - code portion : 64 ++Memory allocation - code size : 64 ++Memory allocation - data size : 18 + ------------------------------------------------------------------ + 0 29 Bra + 2 18 Bra +@@ -252,8 +237,8 @@ Memory allocation - code portion : 64 + ------------------------------------------------------------------ + + /(?Pa)...(?P=a)bbb(?P>a)d/ +-Memory allocation - compiled block : 196 +-Memory allocation - code portion : 54 ++Memory allocation - code size : 54 ++Memory allocation - data size : 6 + ------------------------------------------------------------------ + 0 24 Bra + 2 5 CBra 1 +@@ -271,8 +256,7 @@ Memory allocation - code portion : 54 + ------------------------------------------------------------------ + + /abc(?C255)de(?C)f/ +-Memory allocation - compiled block : 186 +-Memory allocation - code portion : 50 ++Memory allocation - code size : 50 + ------------------------------------------------------------------ + 0 22 Bra + 2 abc +@@ -285,8 +269,7 @@ Memory allocation - code portion : 50 + ------------------------------------------------------------------ + + /abcde/auto_callout +-Memory allocation - compiled block : 214 +-Memory allocation - code portion : 78 ++Memory allocation - code size : 78 + ------------------------------------------------------------------ + 0 36 Bra + 2 Callout 255 0 1 +@@ -305,8 +288,7 @@ Memory allocation - code portion : 78 + ------------------------------------------------------------------ + + /\x{100}/utf +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{100} +@@ -315,8 +297,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /\x{1000}/utf +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{1000} +@@ -325,8 +306,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /\x{10000}/utf +-Memory allocation - compiled block : 152 +-Memory allocation - code portion : 16 ++Memory allocation - code size : 16 + ------------------------------------------------------------------ + 0 5 Bra + 2 \x{10000} +@@ -335,8 +315,7 @@ Memory allocation - code portion : 16 + ------------------------------------------------------------------ + + /\x{100000}/utf +-Memory allocation - compiled block : 152 +-Memory allocation - code portion : 16 ++Memory allocation - code size : 16 + ------------------------------------------------------------------ + 0 5 Bra + 2 \x{100000} +@@ -345,8 +324,7 @@ Memory allocation - code portion : 16 + ------------------------------------------------------------------ + + /\x{10ffff}/utf +-Memory allocation - compiled block : 152 +-Memory allocation - code portion : 16 ++Memory allocation - code size : 16 + ------------------------------------------------------------------ + 0 5 Bra + 2 \x{10ffff} +@@ -358,8 +336,7 @@ Memory allocation - code portion : 16 + Failed: error 134 at offset 9: character code point value in \x{} or \o{} is too large + + /[\x{ff}]/utf +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{ff} +@@ -368,8 +345,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /[\x{100}]/utf +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{100} +@@ -378,8 +354,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /\x80/utf +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{80} +@@ -388,8 +363,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /\xff/utf +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{ff} +@@ -398,8 +372,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /\x{0041}\x{2262}\x{0391}\x{002e}/I,utf +-Memory allocation - compiled block : 162 +-Memory allocation - code portion : 26 ++Memory allocation - code size : 26 + ------------------------------------------------------------------ + 0 10 Bra + 2 A\x{2262}\x{391}. +@@ -413,8 +386,7 @@ Last code unit = '.' + Subject length lower bound = 4 + + /\x{D55c}\x{ad6d}\x{C5B4}/I,utf +-Memory allocation - compiled block : 158 +-Memory allocation - code portion : 22 ++Memory allocation - code size : 22 + ------------------------------------------------------------------ + 0 8 Bra + 2 \x{d55c}\x{ad6d}\x{c5b4} +@@ -428,8 +400,7 @@ Last code unit = \x{c5b4} + Subject length lower bound = 3 + + /\x{65e5}\x{672c}\x{8a9e}/I,utf +-Memory allocation - compiled block : 158 +-Memory allocation - code portion : 22 ++Memory allocation - code size : 22 + ------------------------------------------------------------------ + 0 8 Bra + 2 \x{65e5}\x{672c}\x{8a9e} +@@ -443,8 +414,7 @@ Last code unit = \x{8a9e} + Subject length lower bound = 3 + + /[\x{100}]/utf +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{100} +@@ -453,8 +423,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /[Z\x{100}]/utf +-Memory allocation - compiled block : 190 +-Memory allocation - code portion : 54 ++Memory allocation - code size : 54 + ------------------------------------------------------------------ + 0 24 Bra + 2 [Z\x{100}] +@@ -463,8 +432,7 @@ Memory allocation - code portion : 54 + ------------------------------------------------------------------ + + /^[\x{100}\E-\Q\E\x{150}]/utf +-Memory allocation - compiled block : 162 +-Memory allocation - code portion : 26 ++Memory allocation - code size : 26 + ------------------------------------------------------------------ + 0 10 Bra + 2 ^ +@@ -474,8 +442,7 @@ Memory allocation - code portion : 26 + ------------------------------------------------------------------ + + /^[\QĀ\E-\QŐ\E]/utf +-Memory allocation - compiled block : 162 +-Memory allocation - code portion : 26 ++Memory allocation - code size : 26 + ------------------------------------------------------------------ + 0 10 Bra + 2 ^ +@@ -488,8 +455,7 @@ Memory allocation - code portion : 26 + Failed: error 106 at offset 13: missing terminating ] for character class + + /[\p{L}]/ +-Memory allocation - compiled block : 160 +-Memory allocation - code portion : 24 ++Memory allocation - code size : 24 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\p{L}] +@@ -498,8 +464,7 @@ Memory allocation - code portion : 24 + ------------------------------------------------------------------ + + /[\p{^L}]/ +-Memory allocation - compiled block : 160 +-Memory allocation - code portion : 24 ++Memory allocation - code size : 24 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\P{L}] +@@ -508,8 +473,7 @@ Memory allocation - code portion : 24 + ------------------------------------------------------------------ + + /[\P{L}]/ +-Memory allocation - compiled block : 160 +-Memory allocation - code portion : 24 ++Memory allocation - code size : 24 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\P{L}] +@@ -518,8 +482,7 @@ Memory allocation - code portion : 24 + ------------------------------------------------------------------ + + /[\P{^L}]/ +-Memory allocation - compiled block : 160 +-Memory allocation - code portion : 24 ++Memory allocation - code size : 24 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\p{L}] +@@ -528,8 +491,7 @@ Memory allocation - code portion : 24 + ------------------------------------------------------------------ + + /[abc\p{L}\x{0660}]/utf +-Memory allocation - compiled block : 196 +-Memory allocation - code portion : 60 ++Memory allocation - code size : 60 + ------------------------------------------------------------------ + 0 27 Bra + 2 [a-c\p{L}\x{660}] +@@ -538,8 +500,7 @@ Memory allocation - code portion : 60 + ------------------------------------------------------------------ + + /[\p{Nd}]/utf +-Memory allocation - compiled block : 160 +-Memory allocation - code portion : 24 ++Memory allocation - code size : 24 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\p{Nd}] +@@ -548,8 +509,7 @@ Memory allocation - code portion : 24 + ------------------------------------------------------------------ + + /[\p{Nd}+-]+/utf +-Memory allocation - compiled block : 194 +-Memory allocation - code portion : 58 ++Memory allocation - code size : 58 + ------------------------------------------------------------------ + 0 26 Bra + 2 [+\-\p{Nd}]++ +@@ -558,8 +518,7 @@ Memory allocation - code portion : 58 + ------------------------------------------------------------------ + + /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf +-Memory allocation - compiled block : 168 +-Memory allocation - code portion : 32 ++Memory allocation - code size : 32 + ------------------------------------------------------------------ + 0 13 Bra + 2 /i A\x{391}\x{10427}\x{ff3a}\x{1fb0} +@@ -568,8 +527,7 @@ Memory allocation - code portion : 32 + ------------------------------------------------------------------ + + /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf +-Memory allocation - compiled block : 168 +-Memory allocation - code portion : 32 ++Memory allocation - code size : 32 + ------------------------------------------------------------------ + 0 13 Bra + 2 A\x{391}\x{10427}\x{ff3a}\x{1fb0} +@@ -578,8 +536,7 @@ Memory allocation - code portion : 32 + ------------------------------------------------------------------ + + /[\x{105}-\x{109}]/i,utf +-Memory allocation - compiled block : 160 +-Memory allocation - code portion : 24 ++Memory allocation - code size : 24 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\x{104}-\x{109}] +@@ -588,8 +545,7 @@ Memory allocation - code portion : 24 + ------------------------------------------------------------------ + + /( ( (?(1)0|) )* )/x +-Memory allocation - compiled block : 188 +-Memory allocation - code portion : 52 ++Memory allocation - code size : 52 + ------------------------------------------------------------------ + 0 23 Bra + 2 19 CBra 1 +@@ -607,8 +563,7 @@ Memory allocation - code portion : 52 + ------------------------------------------------------------------ + + /( (?(1)0|)* )/x +-Memory allocation - compiled block : 178 +-Memory allocation - code portion : 42 ++Memory allocation - code size : 42 + ------------------------------------------------------------------ + 0 18 Bra + 2 14 CBra 1 +@@ -624,8 +579,7 @@ Memory allocation - code portion : 42 + ------------------------------------------------------------------ + + /[a]/ +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 4 Bra + 2 a +@@ -634,8 +588,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /[a]/utf +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 4 Bra + 2 a +@@ -644,8 +597,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /[\xaa]/ +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{aa} +@@ -654,8 +606,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /[\xaa]/utf +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{aa} +@@ -664,8 +615,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /[^a]/ +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 4 Bra + 2 [^a] +@@ -674,8 +624,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /[^a]/utf +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 4 Bra + 2 [^a] +@@ -684,8 +633,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /[^\xaa]/ +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 4 Bra + 2 [^\x{aa}] +@@ -694,8 +642,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /[^\xaa]/utf +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 4 Bra + 2 [^\x{aa}] +diff --git a/testdata/testoutput8-16-3 b/testdata/testoutput8-16-3 +index 4ec13ea9..28acd251 100644 +--- a/testdata/testoutput8-16-3 ++++ b/testdata/testoutput8-16-3 +@@ -10,8 +10,7 @@ + #pattern fullbincode,memory + + /((?i)b)/ +-Memory allocation - compiled block : 168 +-Memory allocation - code portion : 32 ++Memory allocation - code size : 32 + ------------------------------------------------------------------ + 0 12 Bra + 3 6 CBra 1 +@@ -22,8 +21,7 @@ Memory allocation - code portion : 32 + ------------------------------------------------------------------ + + /(?s)(.*X|^B)/ +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 20 Bra + 3 8 CBra 1 +@@ -38,8 +36,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /(?s:.*X|^B)/ +-Memory allocation - compiled block : 182 +-Memory allocation - code portion : 46 ++Memory allocation - code size : 46 + ------------------------------------------------------------------ + 0 19 Bra + 3 7 Bra +@@ -54,8 +51,7 @@ Memory allocation - code portion : 46 + ------------------------------------------------------------------ + + /^[[:alnum:]]/ +-Memory allocation - compiled block : 186 +-Memory allocation - code portion : 50 ++Memory allocation - code size : 50 + ------------------------------------------------------------------ + 0 21 Bra + 3 ^ +@@ -65,8 +61,7 @@ Memory allocation - code portion : 50 + ------------------------------------------------------------------ + + /#/Ix +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 3 Bra + 3 3 Ket +@@ -78,8 +73,7 @@ Options: extended + Subject length lower bound = 0 + + /a#/Ix +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 a +@@ -92,8 +86,7 @@ First code unit = 'a' + Subject length lower bound = 1 + + /x?+/ +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 x?+ +@@ -102,8 +95,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /x++/ +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 x++ +@@ -112,8 +104,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /x{1,3}+/ +-Memory allocation - compiled block : 160 +-Memory allocation - code portion : 24 ++Memory allocation - code size : 24 + ------------------------------------------------------------------ + 0 8 Bra + 3 x +@@ -123,8 +114,7 @@ Memory allocation - code portion : 24 + ------------------------------------------------------------------ + + /(x)*+/ +-Memory allocation - compiled block : 170 +-Memory allocation - code portion : 34 ++Memory allocation - code size : 34 + ------------------------------------------------------------------ + 0 13 Bra + 3 Braposzero +@@ -136,8 +126,7 @@ Memory allocation - code portion : 34 + ------------------------------------------------------------------ + + /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/ +-Memory allocation - compiled block : 302 +-Memory allocation - code portion : 166 ++Memory allocation - code size : 166 + ------------------------------------------------------------------ + 0 79 Bra + 3 ^ +@@ -160,8 +149,7 @@ Memory allocation - code portion : 166 + ------------------------------------------------------------------ + + "8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b" +-Memory allocation - compiled block : 1788 +-Memory allocation - code portion : 1652 ++Memory allocation - code size : 1652 + ------------------------------------------------------------------ + 0 822 Bra + 3 8J$WE<.rX+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDDqmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X +@@ -171,8 +159,7 @@ Memory allocation - code portion : 1652 + ------------------------------------------------------------------ + + "\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b" +-Memory allocation - compiled block : 1768 +-Memory allocation - code portion : 1632 ++Memory allocation - code size : 1632 + ------------------------------------------------------------------ + 0 812 Bra + 3 $<.X+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDDqmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X +@@ -182,8 +169,7 @@ Memory allocation - code portion : 1632 + ------------------------------------------------------------------ + + /(a(?1)b)/ +-Memory allocation - compiled block : 178 +-Memory allocation - code portion : 42 ++Memory allocation - code size : 42 + ------------------------------------------------------------------ + 0 17 Bra + 3 11 CBra 1 +@@ -196,8 +182,7 @@ Memory allocation - code portion : 42 + ------------------------------------------------------------------ + + /(a(?1)+b)/ +-Memory allocation - compiled block : 190 +-Memory allocation - code portion : 54 ++Memory allocation - code size : 54 + ------------------------------------------------------------------ + 0 23 Bra + 3 17 CBra 1 +@@ -212,8 +197,8 @@ Memory allocation - code portion : 54 + ------------------------------------------------------------------ + + /a(?Pb|c)d(?Pe)/ +-Memory allocation - compiled block : 256 +-Memory allocation - code portion : 68 ++Memory allocation - code size : 68 ++Memory allocation - data size : 52 + ------------------------------------------------------------------ + 0 30 Bra + 3 a +@@ -231,8 +216,8 @@ Memory allocation - code portion : 68 + ------------------------------------------------------------------ + + /(?:a(?Pc(?Pd)))(?Pa)/ +-Memory allocation - compiled block : 238 +-Memory allocation - code portion : 84 ++Memory allocation - code size : 84 ++Memory allocation - data size : 18 + ------------------------------------------------------------------ + 0 38 Bra + 3 23 Bra +@@ -252,8 +237,8 @@ Memory allocation - code portion : 84 + ------------------------------------------------------------------ + + /(?Pa)...(?P=a)bbb(?P>a)d/ +-Memory allocation - compiled block : 206 +-Memory allocation - code portion : 64 ++Memory allocation - code size : 64 ++Memory allocation - data size : 6 + ------------------------------------------------------------------ + 0 28 Bra + 3 6 CBra 1 +@@ -271,8 +256,7 @@ Memory allocation - code portion : 64 + ------------------------------------------------------------------ + + /abc(?C255)de(?C)f/ +-Memory allocation - compiled block : 198 +-Memory allocation - code portion : 62 ++Memory allocation - code size : 62 + ------------------------------------------------------------------ + 0 27 Bra + 3 abc +@@ -285,8 +269,7 @@ Memory allocation - code portion : 62 + ------------------------------------------------------------------ + + /abcde/auto_callout +-Memory allocation - compiled block : 242 +-Memory allocation - code portion : 106 ++Memory allocation - code size : 106 + ------------------------------------------------------------------ + 0 49 Bra + 3 Callout 255 0 1 +@@ -305,8 +288,7 @@ Memory allocation - code portion : 106 + ------------------------------------------------------------------ + + /\x{100}/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 \x{100} +@@ -315,8 +297,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /\x{1000}/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 \x{1000} +@@ -325,8 +306,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /\x{10000}/utf +-Memory allocation - compiled block : 156 +-Memory allocation - code portion : 20 ++Memory allocation - code size : 20 + ------------------------------------------------------------------ + 0 6 Bra + 3 \x{10000} +@@ -335,8 +315,7 @@ Memory allocation - code portion : 20 + ------------------------------------------------------------------ + + /\x{100000}/utf +-Memory allocation - compiled block : 156 +-Memory allocation - code portion : 20 ++Memory allocation - code size : 20 + ------------------------------------------------------------------ + 0 6 Bra + 3 \x{100000} +@@ -345,8 +324,7 @@ Memory allocation - code portion : 20 + ------------------------------------------------------------------ + + /\x{10ffff}/utf +-Memory allocation - compiled block : 156 +-Memory allocation - code portion : 20 ++Memory allocation - code size : 20 + ------------------------------------------------------------------ + 0 6 Bra + 3 \x{10ffff} +@@ -358,8 +336,7 @@ Memory allocation - code portion : 20 + Failed: error 134 at offset 9: character code point value in \x{} or \o{} is too large + + /[\x{ff}]/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 \x{ff} +@@ -368,8 +345,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[\x{100}]/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 \x{100} +@@ -378,8 +354,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /\x80/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 \x{80} +@@ -388,8 +363,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /\xff/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 \x{ff} +@@ -398,8 +372,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /\x{0041}\x{2262}\x{0391}\x{002e}/I,utf +-Memory allocation - compiled block : 166 +-Memory allocation - code portion : 30 ++Memory allocation - code size : 30 + ------------------------------------------------------------------ + 0 11 Bra + 3 A\x{2262}\x{391}. +@@ -413,8 +386,7 @@ Last code unit = '.' + Subject length lower bound = 4 + + /\x{D55c}\x{ad6d}\x{C5B4}/I,utf +-Memory allocation - compiled block : 162 +-Memory allocation - code portion : 26 ++Memory allocation - code size : 26 + ------------------------------------------------------------------ + 0 9 Bra + 3 \x{d55c}\x{ad6d}\x{c5b4} +@@ -428,8 +400,7 @@ Last code unit = \x{c5b4} + Subject length lower bound = 3 + + /\x{65e5}\x{672c}\x{8a9e}/I,utf +-Memory allocation - compiled block : 162 +-Memory allocation - code portion : 26 ++Memory allocation - code size : 26 + ------------------------------------------------------------------ + 0 9 Bra + 3 \x{65e5}\x{672c}\x{8a9e} +@@ -443,8 +414,7 @@ Last code unit = \x{8a9e} + Subject length lower bound = 3 + + /[\x{100}]/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 \x{100} +@@ -453,8 +423,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[Z\x{100}]/utf +-Memory allocation - compiled block : 196 +-Memory allocation - code portion : 60 ++Memory allocation - code size : 60 + ------------------------------------------------------------------ + 0 26 Bra + 3 [Z\x{100}] +@@ -463,8 +432,7 @@ Memory allocation - code portion : 60 + ------------------------------------------------------------------ + + /^[\x{100}\E-\Q\E\x{150}]/utf +-Memory allocation - compiled block : 168 +-Memory allocation - code portion : 32 ++Memory allocation - code size : 32 + ------------------------------------------------------------------ + 0 12 Bra + 3 ^ +@@ -474,8 +442,7 @@ Memory allocation - code portion : 32 + ------------------------------------------------------------------ + + /^[\QĀ\E-\QŐ\E]/utf +-Memory allocation - compiled block : 168 +-Memory allocation - code portion : 32 ++Memory allocation - code size : 32 + ------------------------------------------------------------------ + 0 12 Bra + 3 ^ +@@ -488,8 +455,7 @@ Memory allocation - code portion : 32 + Failed: error 106 at offset 13: missing terminating ] for character class + + /[\p{L}]/ +-Memory allocation - compiled block : 166 +-Memory allocation - code portion : 30 ++Memory allocation - code size : 30 + ------------------------------------------------------------------ + 0 11 Bra + 3 [\p{L}] +@@ -498,8 +464,7 @@ Memory allocation - code portion : 30 + ------------------------------------------------------------------ + + /[\p{^L}]/ +-Memory allocation - compiled block : 166 +-Memory allocation - code portion : 30 ++Memory allocation - code size : 30 + ------------------------------------------------------------------ + 0 11 Bra + 3 [\P{L}] +@@ -508,8 +473,7 @@ Memory allocation - code portion : 30 + ------------------------------------------------------------------ + + /[\P{L}]/ +-Memory allocation - compiled block : 166 +-Memory allocation - code portion : 30 ++Memory allocation - code size : 30 + ------------------------------------------------------------------ + 0 11 Bra + 3 [\P{L}] +@@ -518,8 +482,7 @@ Memory allocation - code portion : 30 + ------------------------------------------------------------------ + + /[\P{^L}]/ +-Memory allocation - compiled block : 166 +-Memory allocation - code portion : 30 ++Memory allocation - code size : 30 + ------------------------------------------------------------------ + 0 11 Bra + 3 [\p{L}] +@@ -528,8 +491,7 @@ Memory allocation - code portion : 30 + ------------------------------------------------------------------ + + /[abc\p{L}\x{0660}]/utf +-Memory allocation - compiled block : 202 +-Memory allocation - code portion : 66 ++Memory allocation - code size : 66 + ------------------------------------------------------------------ + 0 29 Bra + 3 [a-c\p{L}\x{660}] +@@ -538,8 +500,7 @@ Memory allocation - code portion : 66 + ------------------------------------------------------------------ + + /[\p{Nd}]/utf +-Memory allocation - compiled block : 166 +-Memory allocation - code portion : 30 ++Memory allocation - code size : 30 + ------------------------------------------------------------------ + 0 11 Bra + 3 [\p{Nd}] +@@ -548,8 +509,7 @@ Memory allocation - code portion : 30 + ------------------------------------------------------------------ + + /[\p{Nd}+-]+/utf +-Memory allocation - compiled block : 200 +-Memory allocation - code portion : 64 ++Memory allocation - code size : 64 + ------------------------------------------------------------------ + 0 28 Bra + 3 [+\-\p{Nd}]++ +@@ -558,8 +518,7 @@ Memory allocation - code portion : 64 + ------------------------------------------------------------------ + + /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf +-Memory allocation - compiled block : 172 +-Memory allocation - code portion : 36 ++Memory allocation - code size : 36 + ------------------------------------------------------------------ + 0 14 Bra + 3 /i A\x{391}\x{10427}\x{ff3a}\x{1fb0} +@@ -568,8 +527,7 @@ Memory allocation - code portion : 36 + ------------------------------------------------------------------ + + /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf +-Memory allocation - compiled block : 172 +-Memory allocation - code portion : 36 ++Memory allocation - code size : 36 + ------------------------------------------------------------------ + 0 14 Bra + 3 A\x{391}\x{10427}\x{ff3a}\x{1fb0} +@@ -578,8 +536,7 @@ Memory allocation - code portion : 36 + ------------------------------------------------------------------ + + /[\x{105}-\x{109}]/i,utf +-Memory allocation - compiled block : 166 +-Memory allocation - code portion : 30 ++Memory allocation - code size : 30 + ------------------------------------------------------------------ + 0 11 Bra + 3 [\x{104}-\x{109}] +@@ -588,8 +545,7 @@ Memory allocation - code portion : 30 + ------------------------------------------------------------------ + + /( ( (?(1)0|) )* )/x +-Memory allocation - compiled block : 206 +-Memory allocation - code portion : 70 ++Memory allocation - code size : 70 + ------------------------------------------------------------------ + 0 31 Bra + 3 25 CBra 1 +@@ -607,8 +563,7 @@ Memory allocation - code portion : 70 + ------------------------------------------------------------------ + + /( (?(1)0|)* )/x +-Memory allocation - compiled block : 192 +-Memory allocation - code portion : 56 ++Memory allocation - code size : 56 + ------------------------------------------------------------------ + 0 24 Bra + 3 18 CBra 1 +@@ -624,8 +579,7 @@ Memory allocation - code portion : 56 + ------------------------------------------------------------------ + + /[a]/ +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 a +@@ -634,8 +588,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[a]/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 a +@@ -644,8 +597,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[\xaa]/ +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 \x{aa} +@@ -654,8 +606,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[\xaa]/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 \x{aa} +@@ -664,8 +615,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[^a]/ +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 [^a] +@@ -674,8 +624,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[^a]/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 [^a] +@@ -684,8 +633,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[^\xaa]/ +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 [^\x{aa}] +@@ -694,8 +642,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[^\xaa]/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 [^\x{aa}] +diff --git a/testdata/testoutput8-16-4 b/testdata/testoutput8-16-4 +index 4ec13ea9..28acd251 100644 +--- a/testdata/testoutput8-16-4 ++++ b/testdata/testoutput8-16-4 +@@ -10,8 +10,7 @@ + #pattern fullbincode,memory + + /((?i)b)/ +-Memory allocation - compiled block : 168 +-Memory allocation - code portion : 32 ++Memory allocation - code size : 32 + ------------------------------------------------------------------ + 0 12 Bra + 3 6 CBra 1 +@@ -22,8 +21,7 @@ Memory allocation - code portion : 32 + ------------------------------------------------------------------ + + /(?s)(.*X|^B)/ +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 20 Bra + 3 8 CBra 1 +@@ -38,8 +36,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /(?s:.*X|^B)/ +-Memory allocation - compiled block : 182 +-Memory allocation - code portion : 46 ++Memory allocation - code size : 46 + ------------------------------------------------------------------ + 0 19 Bra + 3 7 Bra +@@ -54,8 +51,7 @@ Memory allocation - code portion : 46 + ------------------------------------------------------------------ + + /^[[:alnum:]]/ +-Memory allocation - compiled block : 186 +-Memory allocation - code portion : 50 ++Memory allocation - code size : 50 + ------------------------------------------------------------------ + 0 21 Bra + 3 ^ +@@ -65,8 +61,7 @@ Memory allocation - code portion : 50 + ------------------------------------------------------------------ + + /#/Ix +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 3 Bra + 3 3 Ket +@@ -78,8 +73,7 @@ Options: extended + Subject length lower bound = 0 + + /a#/Ix +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 a +@@ -92,8 +86,7 @@ First code unit = 'a' + Subject length lower bound = 1 + + /x?+/ +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 x?+ +@@ -102,8 +95,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /x++/ +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 x++ +@@ -112,8 +104,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /x{1,3}+/ +-Memory allocation - compiled block : 160 +-Memory allocation - code portion : 24 ++Memory allocation - code size : 24 + ------------------------------------------------------------------ + 0 8 Bra + 3 x +@@ -123,8 +114,7 @@ Memory allocation - code portion : 24 + ------------------------------------------------------------------ + + /(x)*+/ +-Memory allocation - compiled block : 170 +-Memory allocation - code portion : 34 ++Memory allocation - code size : 34 + ------------------------------------------------------------------ + 0 13 Bra + 3 Braposzero +@@ -136,8 +126,7 @@ Memory allocation - code portion : 34 + ------------------------------------------------------------------ + + /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/ +-Memory allocation - compiled block : 302 +-Memory allocation - code portion : 166 ++Memory allocation - code size : 166 + ------------------------------------------------------------------ + 0 79 Bra + 3 ^ +@@ -160,8 +149,7 @@ Memory allocation - code portion : 166 + ------------------------------------------------------------------ + + "8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b" +-Memory allocation - compiled block : 1788 +-Memory allocation - code portion : 1652 ++Memory allocation - code size : 1652 + ------------------------------------------------------------------ + 0 822 Bra + 3 8J$WE<.rX+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDDqmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X +@@ -171,8 +159,7 @@ Memory allocation - code portion : 1652 + ------------------------------------------------------------------ + + "\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b" +-Memory allocation - compiled block : 1768 +-Memory allocation - code portion : 1632 ++Memory allocation - code size : 1632 + ------------------------------------------------------------------ + 0 812 Bra + 3 $<.X+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDDqmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X +@@ -182,8 +169,7 @@ Memory allocation - code portion : 1632 + ------------------------------------------------------------------ + + /(a(?1)b)/ +-Memory allocation - compiled block : 178 +-Memory allocation - code portion : 42 ++Memory allocation - code size : 42 + ------------------------------------------------------------------ + 0 17 Bra + 3 11 CBra 1 +@@ -196,8 +182,7 @@ Memory allocation - code portion : 42 + ------------------------------------------------------------------ + + /(a(?1)+b)/ +-Memory allocation - compiled block : 190 +-Memory allocation - code portion : 54 ++Memory allocation - code size : 54 + ------------------------------------------------------------------ + 0 23 Bra + 3 17 CBra 1 +@@ -212,8 +197,8 @@ Memory allocation - code portion : 54 + ------------------------------------------------------------------ + + /a(?Pb|c)d(?Pe)/ +-Memory allocation - compiled block : 256 +-Memory allocation - code portion : 68 ++Memory allocation - code size : 68 ++Memory allocation - data size : 52 + ------------------------------------------------------------------ + 0 30 Bra + 3 a +@@ -231,8 +216,8 @@ Memory allocation - code portion : 68 + ------------------------------------------------------------------ + + /(?:a(?Pc(?Pd)))(?Pa)/ +-Memory allocation - compiled block : 238 +-Memory allocation - code portion : 84 ++Memory allocation - code size : 84 ++Memory allocation - data size : 18 + ------------------------------------------------------------------ + 0 38 Bra + 3 23 Bra +@@ -252,8 +237,8 @@ Memory allocation - code portion : 84 + ------------------------------------------------------------------ + + /(?Pa)...(?P=a)bbb(?P>a)d/ +-Memory allocation - compiled block : 206 +-Memory allocation - code portion : 64 ++Memory allocation - code size : 64 ++Memory allocation - data size : 6 + ------------------------------------------------------------------ + 0 28 Bra + 3 6 CBra 1 +@@ -271,8 +256,7 @@ Memory allocation - code portion : 64 + ------------------------------------------------------------------ + + /abc(?C255)de(?C)f/ +-Memory allocation - compiled block : 198 +-Memory allocation - code portion : 62 ++Memory allocation - code size : 62 + ------------------------------------------------------------------ + 0 27 Bra + 3 abc +@@ -285,8 +269,7 @@ Memory allocation - code portion : 62 + ------------------------------------------------------------------ + + /abcde/auto_callout +-Memory allocation - compiled block : 242 +-Memory allocation - code portion : 106 ++Memory allocation - code size : 106 + ------------------------------------------------------------------ + 0 49 Bra + 3 Callout 255 0 1 +@@ -305,8 +288,7 @@ Memory allocation - code portion : 106 + ------------------------------------------------------------------ + + /\x{100}/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 \x{100} +@@ -315,8 +297,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /\x{1000}/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 \x{1000} +@@ -325,8 +306,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /\x{10000}/utf +-Memory allocation - compiled block : 156 +-Memory allocation - code portion : 20 ++Memory allocation - code size : 20 + ------------------------------------------------------------------ + 0 6 Bra + 3 \x{10000} +@@ -335,8 +315,7 @@ Memory allocation - code portion : 20 + ------------------------------------------------------------------ + + /\x{100000}/utf +-Memory allocation - compiled block : 156 +-Memory allocation - code portion : 20 ++Memory allocation - code size : 20 + ------------------------------------------------------------------ + 0 6 Bra + 3 \x{100000} +@@ -345,8 +324,7 @@ Memory allocation - code portion : 20 + ------------------------------------------------------------------ + + /\x{10ffff}/utf +-Memory allocation - compiled block : 156 +-Memory allocation - code portion : 20 ++Memory allocation - code size : 20 + ------------------------------------------------------------------ + 0 6 Bra + 3 \x{10ffff} +@@ -358,8 +336,7 @@ Memory allocation - code portion : 20 + Failed: error 134 at offset 9: character code point value in \x{} or \o{} is too large + + /[\x{ff}]/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 \x{ff} +@@ -368,8 +345,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[\x{100}]/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 \x{100} +@@ -378,8 +354,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /\x80/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 \x{80} +@@ -388,8 +363,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /\xff/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 \x{ff} +@@ -398,8 +372,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /\x{0041}\x{2262}\x{0391}\x{002e}/I,utf +-Memory allocation - compiled block : 166 +-Memory allocation - code portion : 30 ++Memory allocation - code size : 30 + ------------------------------------------------------------------ + 0 11 Bra + 3 A\x{2262}\x{391}. +@@ -413,8 +386,7 @@ Last code unit = '.' + Subject length lower bound = 4 + + /\x{D55c}\x{ad6d}\x{C5B4}/I,utf +-Memory allocation - compiled block : 162 +-Memory allocation - code portion : 26 ++Memory allocation - code size : 26 + ------------------------------------------------------------------ + 0 9 Bra + 3 \x{d55c}\x{ad6d}\x{c5b4} +@@ -428,8 +400,7 @@ Last code unit = \x{c5b4} + Subject length lower bound = 3 + + /\x{65e5}\x{672c}\x{8a9e}/I,utf +-Memory allocation - compiled block : 162 +-Memory allocation - code portion : 26 ++Memory allocation - code size : 26 + ------------------------------------------------------------------ + 0 9 Bra + 3 \x{65e5}\x{672c}\x{8a9e} +@@ -443,8 +414,7 @@ Last code unit = \x{8a9e} + Subject length lower bound = 3 + + /[\x{100}]/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 \x{100} +@@ -453,8 +423,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[Z\x{100}]/utf +-Memory allocation - compiled block : 196 +-Memory allocation - code portion : 60 ++Memory allocation - code size : 60 + ------------------------------------------------------------------ + 0 26 Bra + 3 [Z\x{100}] +@@ -463,8 +432,7 @@ Memory allocation - code portion : 60 + ------------------------------------------------------------------ + + /^[\x{100}\E-\Q\E\x{150}]/utf +-Memory allocation - compiled block : 168 +-Memory allocation - code portion : 32 ++Memory allocation - code size : 32 + ------------------------------------------------------------------ + 0 12 Bra + 3 ^ +@@ -474,8 +442,7 @@ Memory allocation - code portion : 32 + ------------------------------------------------------------------ + + /^[\QĀ\E-\QŐ\E]/utf +-Memory allocation - compiled block : 168 +-Memory allocation - code portion : 32 ++Memory allocation - code size : 32 + ------------------------------------------------------------------ + 0 12 Bra + 3 ^ +@@ -488,8 +455,7 @@ Memory allocation - code portion : 32 + Failed: error 106 at offset 13: missing terminating ] for character class + + /[\p{L}]/ +-Memory allocation - compiled block : 166 +-Memory allocation - code portion : 30 ++Memory allocation - code size : 30 + ------------------------------------------------------------------ + 0 11 Bra + 3 [\p{L}] +@@ -498,8 +464,7 @@ Memory allocation - code portion : 30 + ------------------------------------------------------------------ + + /[\p{^L}]/ +-Memory allocation - compiled block : 166 +-Memory allocation - code portion : 30 ++Memory allocation - code size : 30 + ------------------------------------------------------------------ + 0 11 Bra + 3 [\P{L}] +@@ -508,8 +473,7 @@ Memory allocation - code portion : 30 + ------------------------------------------------------------------ + + /[\P{L}]/ +-Memory allocation - compiled block : 166 +-Memory allocation - code portion : 30 ++Memory allocation - code size : 30 + ------------------------------------------------------------------ + 0 11 Bra + 3 [\P{L}] +@@ -518,8 +482,7 @@ Memory allocation - code portion : 30 + ------------------------------------------------------------------ + + /[\P{^L}]/ +-Memory allocation - compiled block : 166 +-Memory allocation - code portion : 30 ++Memory allocation - code size : 30 + ------------------------------------------------------------------ + 0 11 Bra + 3 [\p{L}] +@@ -528,8 +491,7 @@ Memory allocation - code portion : 30 + ------------------------------------------------------------------ + + /[abc\p{L}\x{0660}]/utf +-Memory allocation - compiled block : 202 +-Memory allocation - code portion : 66 ++Memory allocation - code size : 66 + ------------------------------------------------------------------ + 0 29 Bra + 3 [a-c\p{L}\x{660}] +@@ -538,8 +500,7 @@ Memory allocation - code portion : 66 + ------------------------------------------------------------------ + + /[\p{Nd}]/utf +-Memory allocation - compiled block : 166 +-Memory allocation - code portion : 30 ++Memory allocation - code size : 30 + ------------------------------------------------------------------ + 0 11 Bra + 3 [\p{Nd}] +@@ -548,8 +509,7 @@ Memory allocation - code portion : 30 + ------------------------------------------------------------------ + + /[\p{Nd}+-]+/utf +-Memory allocation - compiled block : 200 +-Memory allocation - code portion : 64 ++Memory allocation - code size : 64 + ------------------------------------------------------------------ + 0 28 Bra + 3 [+\-\p{Nd}]++ +@@ -558,8 +518,7 @@ Memory allocation - code portion : 64 + ------------------------------------------------------------------ + + /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf +-Memory allocation - compiled block : 172 +-Memory allocation - code portion : 36 ++Memory allocation - code size : 36 + ------------------------------------------------------------------ + 0 14 Bra + 3 /i A\x{391}\x{10427}\x{ff3a}\x{1fb0} +@@ -568,8 +527,7 @@ Memory allocation - code portion : 36 + ------------------------------------------------------------------ + + /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf +-Memory allocation - compiled block : 172 +-Memory allocation - code portion : 36 ++Memory allocation - code size : 36 + ------------------------------------------------------------------ + 0 14 Bra + 3 A\x{391}\x{10427}\x{ff3a}\x{1fb0} +@@ -578,8 +536,7 @@ Memory allocation - code portion : 36 + ------------------------------------------------------------------ + + /[\x{105}-\x{109}]/i,utf +-Memory allocation - compiled block : 166 +-Memory allocation - code portion : 30 ++Memory allocation - code size : 30 + ------------------------------------------------------------------ + 0 11 Bra + 3 [\x{104}-\x{109}] +@@ -588,8 +545,7 @@ Memory allocation - code portion : 30 + ------------------------------------------------------------------ + + /( ( (?(1)0|) )* )/x +-Memory allocation - compiled block : 206 +-Memory allocation - code portion : 70 ++Memory allocation - code size : 70 + ------------------------------------------------------------------ + 0 31 Bra + 3 25 CBra 1 +@@ -607,8 +563,7 @@ Memory allocation - code portion : 70 + ------------------------------------------------------------------ + + /( (?(1)0|)* )/x +-Memory allocation - compiled block : 192 +-Memory allocation - code portion : 56 ++Memory allocation - code size : 56 + ------------------------------------------------------------------ + 0 24 Bra + 3 18 CBra 1 +@@ -624,8 +579,7 @@ Memory allocation - code portion : 56 + ------------------------------------------------------------------ + + /[a]/ +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 a +@@ -634,8 +588,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[a]/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 a +@@ -644,8 +597,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[\xaa]/ +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 \x{aa} +@@ -654,8 +606,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[\xaa]/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 \x{aa} +@@ -664,8 +615,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[^a]/ +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 [^a] +@@ -674,8 +624,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[^a]/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 [^a] +@@ -684,8 +633,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[^\xaa]/ +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 [^\x{aa}] +@@ -694,8 +642,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[^\xaa]/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 5 Bra + 3 [^\x{aa}] +diff --git a/testdata/testoutput8-32-2 b/testdata/testoutput8-32-2 +index d76f3aaa..90ea536f 100644 +--- a/testdata/testoutput8-32-2 ++++ b/testdata/testoutput8-32-2 +@@ -10,8 +10,7 @@ + #pattern fullbincode,memory + + /((?i)b)/ +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 9 Bra + 2 5 CBra 1 +@@ -22,8 +21,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /(?s)(.*X|^B)/ +-Memory allocation - compiled block : 212 +-Memory allocation - code portion : 76 ++Memory allocation - code size : 76 + ------------------------------------------------------------------ + 0 16 Bra + 2 7 CBra 1 +@@ -38,8 +36,7 @@ Memory allocation - code portion : 76 + ------------------------------------------------------------------ + + /(?s:.*X|^B)/ +-Memory allocation - compiled block : 208 +-Memory allocation - code portion : 72 ++Memory allocation - code size : 72 + ------------------------------------------------------------------ + 0 15 Bra + 2 6 Bra +@@ -54,8 +51,7 @@ Memory allocation - code portion : 72 + ------------------------------------------------------------------ + + /^[[:alnum:]]/ +-Memory allocation - compiled block : 196 +-Memory allocation - code portion : 60 ++Memory allocation - code size : 60 + ------------------------------------------------------------------ + 0 12 Bra + 2 ^ +@@ -65,8 +61,7 @@ Memory allocation - code portion : 60 + ------------------------------------------------------------------ + + /#/Ix +-Memory allocation - compiled block : 156 +-Memory allocation - code portion : 20 ++Memory allocation - code size : 20 + ------------------------------------------------------------------ + 0 2 Bra + 2 2 Ket +@@ -78,8 +73,7 @@ Options: extended + Subject length lower bound = 0 + + /a#/Ix +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 a +@@ -92,8 +86,7 @@ First code unit = 'a' + Subject length lower bound = 1 + + /x?+/ +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 x?+ +@@ -102,8 +95,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /x++/ +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 x++ +@@ -112,8 +104,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /x{1,3}+/ +-Memory allocation - compiled block : 176 +-Memory allocation - code portion : 40 ++Memory allocation - code size : 40 + ------------------------------------------------------------------ + 0 7 Bra + 2 x +@@ -123,8 +114,7 @@ Memory allocation - code portion : 40 + ------------------------------------------------------------------ + + /(x)*+/ +-Memory allocation - compiled block : 188 +-Memory allocation - code portion : 52 ++Memory allocation - code size : 52 + ------------------------------------------------------------------ + 0 10 Bra + 2 Braposzero +@@ -136,8 +126,7 @@ Memory allocation - code portion : 52 + ------------------------------------------------------------------ + + /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/ +-Memory allocation - compiled block : 356 +-Memory allocation - code portion : 220 ++Memory allocation - code size : 220 + ------------------------------------------------------------------ + 0 52 Bra + 2 ^ +@@ -160,8 +149,7 @@ Memory allocation - code portion : 220 + ------------------------------------------------------------------ + + "8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b" +-Memory allocation - compiled block : 3432 +-Memory allocation - code portion : 3296 ++Memory allocation - code size : 3296 + ------------------------------------------------------------------ + 0 821 Bra + 2 8J$WE<.rX+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDDqmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X +@@ -171,8 +159,7 @@ Memory allocation - code portion : 3296 + ------------------------------------------------------------------ + + "\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b" +-Memory allocation - compiled block : 3392 +-Memory allocation - code portion : 3256 ++Memory allocation - code size : 3256 + ------------------------------------------------------------------ + 0 811 Bra + 2 $<.X+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDDqmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X +@@ -182,8 +169,7 @@ Memory allocation - code portion : 3256 + ------------------------------------------------------------------ + + /(a(?1)b)/ +-Memory allocation - compiled block : 200 +-Memory allocation - code portion : 64 ++Memory allocation - code size : 64 + ------------------------------------------------------------------ + 0 13 Bra + 2 9 CBra 1 +@@ -196,8 +182,7 @@ Memory allocation - code portion : 64 + ------------------------------------------------------------------ + + /(a(?1)+b)/ +-Memory allocation - compiled block : 216 +-Memory allocation - code portion : 80 ++Memory allocation - code size : 80 + ------------------------------------------------------------------ + 0 17 Bra + 2 13 CBra 1 +@@ -212,8 +197,8 @@ Memory allocation - code portion : 80 + ------------------------------------------------------------------ + + /a(?Pb|c)d(?Pe)/ +-Memory allocation - compiled block : 348 +-Memory allocation - code portion : 108 ++Memory allocation - code size : 108 ++Memory allocation - data size : 104 + ------------------------------------------------------------------ + 0 24 Bra + 2 a +@@ -231,8 +216,8 @@ Memory allocation - code portion : 108 + ------------------------------------------------------------------ + + /(?:a(?Pc(?Pd)))(?Pa)/ +-Memory allocation - compiled block : 300 +-Memory allocation - code portion : 128 ++Memory allocation - code size : 128 ++Memory allocation - data size : 36 + ------------------------------------------------------------------ + 0 29 Bra + 2 18 Bra +@@ -252,8 +237,8 @@ Memory allocation - code portion : 128 + ------------------------------------------------------------------ + + /(?Pa)...(?P=a)bbb(?P>a)d/ +-Memory allocation - compiled block : 256 +-Memory allocation - code portion : 108 ++Memory allocation - code size : 108 ++Memory allocation - data size : 12 + ------------------------------------------------------------------ + 0 24 Bra + 2 5 CBra 1 +@@ -271,8 +256,7 @@ Memory allocation - code portion : 108 + ------------------------------------------------------------------ + + /abc(?C255)de(?C)f/ +-Memory allocation - compiled block : 236 +-Memory allocation - code portion : 100 ++Memory allocation - code size : 100 + ------------------------------------------------------------------ + 0 22 Bra + 2 abc +@@ -285,8 +269,7 @@ Memory allocation - code portion : 100 + ------------------------------------------------------------------ + + /abcde/auto_callout +-Memory allocation - compiled block : 292 +-Memory allocation - code portion : 156 ++Memory allocation - code size : 156 + ------------------------------------------------------------------ + 0 36 Bra + 2 Callout 255 0 1 +@@ -305,8 +288,7 @@ Memory allocation - code portion : 156 + ------------------------------------------------------------------ + + /\x{100}/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{100} +@@ -315,8 +297,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /\x{1000}/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{1000} +@@ -325,8 +306,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /\x{10000}/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{10000} +@@ -335,8 +315,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /\x{100000}/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{100000} +@@ -345,8 +324,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /\x{10ffff}/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{10ffff} +@@ -358,8 +336,7 @@ Memory allocation - code portion : 28 + Failed: error 134 at offset 9: character code point value in \x{} or \o{} is too large + + /[\x{ff}]/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{ff} +@@ -368,8 +345,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[\x{100}]/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{100} +@@ -378,8 +354,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /\x80/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{80} +@@ -388,8 +363,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /\xff/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{ff} +@@ -398,8 +372,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /\x{0041}\x{2262}\x{0391}\x{002e}/I,utf +-Memory allocation - compiled block : 188 +-Memory allocation - code portion : 52 ++Memory allocation - code size : 52 + ------------------------------------------------------------------ + 0 10 Bra + 2 A\x{2262}\x{391}. +@@ -413,8 +386,7 @@ Last code unit = '.' + Subject length lower bound = 4 + + /\x{D55c}\x{ad6d}\x{C5B4}/I,utf +-Memory allocation - compiled block : 180 +-Memory allocation - code portion : 44 ++Memory allocation - code size : 44 + ------------------------------------------------------------------ + 0 8 Bra + 2 \x{d55c}\x{ad6d}\x{c5b4} +@@ -428,8 +400,7 @@ Last code unit = \x{c5b4} + Subject length lower bound = 3 + + /\x{65e5}\x{672c}\x{8a9e}/I,utf +-Memory allocation - compiled block : 180 +-Memory allocation - code portion : 44 ++Memory allocation - code size : 44 + ------------------------------------------------------------------ + 0 8 Bra + 2 \x{65e5}\x{672c}\x{8a9e} +@@ -443,8 +414,7 @@ Last code unit = \x{8a9e} + Subject length lower bound = 3 + + /[\x{100}]/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{100} +@@ -453,8 +423,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[Z\x{100}]/utf +-Memory allocation - compiled block : 212 +-Memory allocation - code portion : 76 ++Memory allocation - code size : 76 + ------------------------------------------------------------------ + 0 16 Bra + 2 [Z\x{100}] +@@ -463,8 +432,7 @@ Memory allocation - code portion : 76 + ------------------------------------------------------------------ + + /^[\x{100}\E-\Q\E\x{150}]/utf +-Memory allocation - compiled block : 188 +-Memory allocation - code portion : 52 ++Memory allocation - code size : 52 + ------------------------------------------------------------------ + 0 10 Bra + 2 ^ +@@ -474,8 +442,7 @@ Memory allocation - code portion : 52 + ------------------------------------------------------------------ + + /^[\QĀ\E-\QŐ\E]/utf +-Memory allocation - compiled block : 188 +-Memory allocation - code portion : 52 ++Memory allocation - code size : 52 + ------------------------------------------------------------------ + 0 10 Bra + 2 ^ +@@ -488,8 +455,7 @@ Memory allocation - code portion : 52 + Failed: error 106 at offset 13: missing terminating ] for character class + + /[\p{L}]/ +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\p{L}] +@@ -498,8 +464,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /[\p{^L}]/ +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\P{L}] +@@ -508,8 +473,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /[\P{L}]/ +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\P{L}] +@@ -518,8 +482,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /[\P{^L}]/ +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\p{L}] +@@ -528,8 +491,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /[abc\p{L}\x{0660}]/utf +-Memory allocation - compiled block : 224 +-Memory allocation - code portion : 88 ++Memory allocation - code size : 88 + ------------------------------------------------------------------ + 0 19 Bra + 2 [a-c\p{L}\x{660}] +@@ -538,8 +500,7 @@ Memory allocation - code portion : 88 + ------------------------------------------------------------------ + + /[\p{Nd}]/utf +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\p{Nd}] +@@ -548,8 +509,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /[\p{Nd}+-]+/utf +-Memory allocation - compiled block : 220 +-Memory allocation - code portion : 84 ++Memory allocation - code size : 84 + ------------------------------------------------------------------ + 0 18 Bra + 2 [+\-\p{Nd}]++ +@@ -558,8 +518,7 @@ Memory allocation - code portion : 84 + ------------------------------------------------------------------ + + /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf +-Memory allocation - compiled block : 196 +-Memory allocation - code portion : 60 ++Memory allocation - code size : 60 + ------------------------------------------------------------------ + 0 12 Bra + 2 /i A\x{391}\x{10427}\x{ff3a}\x{1fb0} +@@ -568,8 +527,7 @@ Memory allocation - code portion : 60 + ------------------------------------------------------------------ + + /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf +-Memory allocation - compiled block : 196 +-Memory allocation - code portion : 60 ++Memory allocation - code size : 60 + ------------------------------------------------------------------ + 0 12 Bra + 2 A\x{391}\x{10427}\x{ff3a}\x{1fb0} +@@ -578,8 +536,7 @@ Memory allocation - code portion : 60 + ------------------------------------------------------------------ + + /[\x{105}-\x{109}]/i,utf +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\x{104}-\x{109}] +@@ -588,8 +545,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /( ( (?(1)0|) )* )/x +-Memory allocation - compiled block : 240 +-Memory allocation - code portion : 104 ++Memory allocation - code size : 104 + ------------------------------------------------------------------ + 0 23 Bra + 2 19 CBra 1 +@@ -607,8 +563,7 @@ Memory allocation - code portion : 104 + ------------------------------------------------------------------ + + /( (?(1)0|)* )/x +-Memory allocation - compiled block : 220 +-Memory allocation - code portion : 84 ++Memory allocation - code size : 84 + ------------------------------------------------------------------ + 0 18 Bra + 2 14 CBra 1 +@@ -624,8 +579,7 @@ Memory allocation - code portion : 84 + ------------------------------------------------------------------ + + /[a]/ +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 a +@@ -634,8 +588,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[a]/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 a +@@ -644,8 +597,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[\xaa]/ +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{aa} +@@ -654,8 +606,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[\xaa]/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{aa} +@@ -664,8 +615,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[^a]/ +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 [^a] +@@ -674,8 +624,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[^a]/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 [^a] +@@ -684,8 +633,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[^\xaa]/ +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 [^\x{aa}] +@@ -694,8 +642,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[^\xaa]/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 [^\x{aa}] +diff --git a/testdata/testoutput8-32-3 b/testdata/testoutput8-32-3 +index d76f3aaa..90ea536f 100644 +--- a/testdata/testoutput8-32-3 ++++ b/testdata/testoutput8-32-3 +@@ -10,8 +10,7 @@ + #pattern fullbincode,memory + + /((?i)b)/ +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 9 Bra + 2 5 CBra 1 +@@ -22,8 +21,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /(?s)(.*X|^B)/ +-Memory allocation - compiled block : 212 +-Memory allocation - code portion : 76 ++Memory allocation - code size : 76 + ------------------------------------------------------------------ + 0 16 Bra + 2 7 CBra 1 +@@ -38,8 +36,7 @@ Memory allocation - code portion : 76 + ------------------------------------------------------------------ + + /(?s:.*X|^B)/ +-Memory allocation - compiled block : 208 +-Memory allocation - code portion : 72 ++Memory allocation - code size : 72 + ------------------------------------------------------------------ + 0 15 Bra + 2 6 Bra +@@ -54,8 +51,7 @@ Memory allocation - code portion : 72 + ------------------------------------------------------------------ + + /^[[:alnum:]]/ +-Memory allocation - compiled block : 196 +-Memory allocation - code portion : 60 ++Memory allocation - code size : 60 + ------------------------------------------------------------------ + 0 12 Bra + 2 ^ +@@ -65,8 +61,7 @@ Memory allocation - code portion : 60 + ------------------------------------------------------------------ + + /#/Ix +-Memory allocation - compiled block : 156 +-Memory allocation - code portion : 20 ++Memory allocation - code size : 20 + ------------------------------------------------------------------ + 0 2 Bra + 2 2 Ket +@@ -78,8 +73,7 @@ Options: extended + Subject length lower bound = 0 + + /a#/Ix +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 a +@@ -92,8 +86,7 @@ First code unit = 'a' + Subject length lower bound = 1 + + /x?+/ +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 x?+ +@@ -102,8 +95,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /x++/ +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 x++ +@@ -112,8 +104,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /x{1,3}+/ +-Memory allocation - compiled block : 176 +-Memory allocation - code portion : 40 ++Memory allocation - code size : 40 + ------------------------------------------------------------------ + 0 7 Bra + 2 x +@@ -123,8 +114,7 @@ Memory allocation - code portion : 40 + ------------------------------------------------------------------ + + /(x)*+/ +-Memory allocation - compiled block : 188 +-Memory allocation - code portion : 52 ++Memory allocation - code size : 52 + ------------------------------------------------------------------ + 0 10 Bra + 2 Braposzero +@@ -136,8 +126,7 @@ Memory allocation - code portion : 52 + ------------------------------------------------------------------ + + /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/ +-Memory allocation - compiled block : 356 +-Memory allocation - code portion : 220 ++Memory allocation - code size : 220 + ------------------------------------------------------------------ + 0 52 Bra + 2 ^ +@@ -160,8 +149,7 @@ Memory allocation - code portion : 220 + ------------------------------------------------------------------ + + "8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b" +-Memory allocation - compiled block : 3432 +-Memory allocation - code portion : 3296 ++Memory allocation - code size : 3296 + ------------------------------------------------------------------ + 0 821 Bra + 2 8J$WE<.rX+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDDqmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X +@@ -171,8 +159,7 @@ Memory allocation - code portion : 3296 + ------------------------------------------------------------------ + + "\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b" +-Memory allocation - compiled block : 3392 +-Memory allocation - code portion : 3256 ++Memory allocation - code size : 3256 + ------------------------------------------------------------------ + 0 811 Bra + 2 $<.X+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDDqmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X +@@ -182,8 +169,7 @@ Memory allocation - code portion : 3256 + ------------------------------------------------------------------ + + /(a(?1)b)/ +-Memory allocation - compiled block : 200 +-Memory allocation - code portion : 64 ++Memory allocation - code size : 64 + ------------------------------------------------------------------ + 0 13 Bra + 2 9 CBra 1 +@@ -196,8 +182,7 @@ Memory allocation - code portion : 64 + ------------------------------------------------------------------ + + /(a(?1)+b)/ +-Memory allocation - compiled block : 216 +-Memory allocation - code portion : 80 ++Memory allocation - code size : 80 + ------------------------------------------------------------------ + 0 17 Bra + 2 13 CBra 1 +@@ -212,8 +197,8 @@ Memory allocation - code portion : 80 + ------------------------------------------------------------------ + + /a(?Pb|c)d(?Pe)/ +-Memory allocation - compiled block : 348 +-Memory allocation - code portion : 108 ++Memory allocation - code size : 108 ++Memory allocation - data size : 104 + ------------------------------------------------------------------ + 0 24 Bra + 2 a +@@ -231,8 +216,8 @@ Memory allocation - code portion : 108 + ------------------------------------------------------------------ + + /(?:a(?Pc(?Pd)))(?Pa)/ +-Memory allocation - compiled block : 300 +-Memory allocation - code portion : 128 ++Memory allocation - code size : 128 ++Memory allocation - data size : 36 + ------------------------------------------------------------------ + 0 29 Bra + 2 18 Bra +@@ -252,8 +237,8 @@ Memory allocation - code portion : 128 + ------------------------------------------------------------------ + + /(?Pa)...(?P=a)bbb(?P>a)d/ +-Memory allocation - compiled block : 256 +-Memory allocation - code portion : 108 ++Memory allocation - code size : 108 ++Memory allocation - data size : 12 + ------------------------------------------------------------------ + 0 24 Bra + 2 5 CBra 1 +@@ -271,8 +256,7 @@ Memory allocation - code portion : 108 + ------------------------------------------------------------------ + + /abc(?C255)de(?C)f/ +-Memory allocation - compiled block : 236 +-Memory allocation - code portion : 100 ++Memory allocation - code size : 100 + ------------------------------------------------------------------ + 0 22 Bra + 2 abc +@@ -285,8 +269,7 @@ Memory allocation - code portion : 100 + ------------------------------------------------------------------ + + /abcde/auto_callout +-Memory allocation - compiled block : 292 +-Memory allocation - code portion : 156 ++Memory allocation - code size : 156 + ------------------------------------------------------------------ + 0 36 Bra + 2 Callout 255 0 1 +@@ -305,8 +288,7 @@ Memory allocation - code portion : 156 + ------------------------------------------------------------------ + + /\x{100}/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{100} +@@ -315,8 +297,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /\x{1000}/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{1000} +@@ -325,8 +306,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /\x{10000}/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{10000} +@@ -335,8 +315,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /\x{100000}/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{100000} +@@ -345,8 +324,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /\x{10ffff}/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{10ffff} +@@ -358,8 +336,7 @@ Memory allocation - code portion : 28 + Failed: error 134 at offset 9: character code point value in \x{} or \o{} is too large + + /[\x{ff}]/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{ff} +@@ -368,8 +345,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[\x{100}]/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{100} +@@ -378,8 +354,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /\x80/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{80} +@@ -388,8 +363,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /\xff/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{ff} +@@ -398,8 +372,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /\x{0041}\x{2262}\x{0391}\x{002e}/I,utf +-Memory allocation - compiled block : 188 +-Memory allocation - code portion : 52 ++Memory allocation - code size : 52 + ------------------------------------------------------------------ + 0 10 Bra + 2 A\x{2262}\x{391}. +@@ -413,8 +386,7 @@ Last code unit = '.' + Subject length lower bound = 4 + + /\x{D55c}\x{ad6d}\x{C5B4}/I,utf +-Memory allocation - compiled block : 180 +-Memory allocation - code portion : 44 ++Memory allocation - code size : 44 + ------------------------------------------------------------------ + 0 8 Bra + 2 \x{d55c}\x{ad6d}\x{c5b4} +@@ -428,8 +400,7 @@ Last code unit = \x{c5b4} + Subject length lower bound = 3 + + /\x{65e5}\x{672c}\x{8a9e}/I,utf +-Memory allocation - compiled block : 180 +-Memory allocation - code portion : 44 ++Memory allocation - code size : 44 + ------------------------------------------------------------------ + 0 8 Bra + 2 \x{65e5}\x{672c}\x{8a9e} +@@ -443,8 +414,7 @@ Last code unit = \x{8a9e} + Subject length lower bound = 3 + + /[\x{100}]/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{100} +@@ -453,8 +423,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[Z\x{100}]/utf +-Memory allocation - compiled block : 212 +-Memory allocation - code portion : 76 ++Memory allocation - code size : 76 + ------------------------------------------------------------------ + 0 16 Bra + 2 [Z\x{100}] +@@ -463,8 +432,7 @@ Memory allocation - code portion : 76 + ------------------------------------------------------------------ + + /^[\x{100}\E-\Q\E\x{150}]/utf +-Memory allocation - compiled block : 188 +-Memory allocation - code portion : 52 ++Memory allocation - code size : 52 + ------------------------------------------------------------------ + 0 10 Bra + 2 ^ +@@ -474,8 +442,7 @@ Memory allocation - code portion : 52 + ------------------------------------------------------------------ + + /^[\QĀ\E-\QŐ\E]/utf +-Memory allocation - compiled block : 188 +-Memory allocation - code portion : 52 ++Memory allocation - code size : 52 + ------------------------------------------------------------------ + 0 10 Bra + 2 ^ +@@ -488,8 +455,7 @@ Memory allocation - code portion : 52 + Failed: error 106 at offset 13: missing terminating ] for character class + + /[\p{L}]/ +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\p{L}] +@@ -498,8 +464,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /[\p{^L}]/ +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\P{L}] +@@ -508,8 +473,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /[\P{L}]/ +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\P{L}] +@@ -518,8 +482,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /[\P{^L}]/ +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\p{L}] +@@ -528,8 +491,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /[abc\p{L}\x{0660}]/utf +-Memory allocation - compiled block : 224 +-Memory allocation - code portion : 88 ++Memory allocation - code size : 88 + ------------------------------------------------------------------ + 0 19 Bra + 2 [a-c\p{L}\x{660}] +@@ -538,8 +500,7 @@ Memory allocation - code portion : 88 + ------------------------------------------------------------------ + + /[\p{Nd}]/utf +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\p{Nd}] +@@ -548,8 +509,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /[\p{Nd}+-]+/utf +-Memory allocation - compiled block : 220 +-Memory allocation - code portion : 84 ++Memory allocation - code size : 84 + ------------------------------------------------------------------ + 0 18 Bra + 2 [+\-\p{Nd}]++ +@@ -558,8 +518,7 @@ Memory allocation - code portion : 84 + ------------------------------------------------------------------ + + /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf +-Memory allocation - compiled block : 196 +-Memory allocation - code portion : 60 ++Memory allocation - code size : 60 + ------------------------------------------------------------------ + 0 12 Bra + 2 /i A\x{391}\x{10427}\x{ff3a}\x{1fb0} +@@ -568,8 +527,7 @@ Memory allocation - code portion : 60 + ------------------------------------------------------------------ + + /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf +-Memory allocation - compiled block : 196 +-Memory allocation - code portion : 60 ++Memory allocation - code size : 60 + ------------------------------------------------------------------ + 0 12 Bra + 2 A\x{391}\x{10427}\x{ff3a}\x{1fb0} +@@ -578,8 +536,7 @@ Memory allocation - code portion : 60 + ------------------------------------------------------------------ + + /[\x{105}-\x{109}]/i,utf +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\x{104}-\x{109}] +@@ -588,8 +545,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /( ( (?(1)0|) )* )/x +-Memory allocation - compiled block : 240 +-Memory allocation - code portion : 104 ++Memory allocation - code size : 104 + ------------------------------------------------------------------ + 0 23 Bra + 2 19 CBra 1 +@@ -607,8 +563,7 @@ Memory allocation - code portion : 104 + ------------------------------------------------------------------ + + /( (?(1)0|)* )/x +-Memory allocation - compiled block : 220 +-Memory allocation - code portion : 84 ++Memory allocation - code size : 84 + ------------------------------------------------------------------ + 0 18 Bra + 2 14 CBra 1 +@@ -624,8 +579,7 @@ Memory allocation - code portion : 84 + ------------------------------------------------------------------ + + /[a]/ +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 a +@@ -634,8 +588,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[a]/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 a +@@ -644,8 +597,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[\xaa]/ +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{aa} +@@ -654,8 +606,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[\xaa]/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{aa} +@@ -664,8 +615,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[^a]/ +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 [^a] +@@ -674,8 +624,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[^a]/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 [^a] +@@ -684,8 +633,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[^\xaa]/ +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 [^\x{aa}] +@@ -694,8 +642,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[^\xaa]/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 [^\x{aa}] +diff --git a/testdata/testoutput8-32-4 b/testdata/testoutput8-32-4 +index d76f3aaa..90ea536f 100644 +--- a/testdata/testoutput8-32-4 ++++ b/testdata/testoutput8-32-4 +@@ -10,8 +10,7 @@ + #pattern fullbincode,memory + + /((?i)b)/ +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 9 Bra + 2 5 CBra 1 +@@ -22,8 +21,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /(?s)(.*X|^B)/ +-Memory allocation - compiled block : 212 +-Memory allocation - code portion : 76 ++Memory allocation - code size : 76 + ------------------------------------------------------------------ + 0 16 Bra + 2 7 CBra 1 +@@ -38,8 +36,7 @@ Memory allocation - code portion : 76 + ------------------------------------------------------------------ + + /(?s:.*X|^B)/ +-Memory allocation - compiled block : 208 +-Memory allocation - code portion : 72 ++Memory allocation - code size : 72 + ------------------------------------------------------------------ + 0 15 Bra + 2 6 Bra +@@ -54,8 +51,7 @@ Memory allocation - code portion : 72 + ------------------------------------------------------------------ + + /^[[:alnum:]]/ +-Memory allocation - compiled block : 196 +-Memory allocation - code portion : 60 ++Memory allocation - code size : 60 + ------------------------------------------------------------------ + 0 12 Bra + 2 ^ +@@ -65,8 +61,7 @@ Memory allocation - code portion : 60 + ------------------------------------------------------------------ + + /#/Ix +-Memory allocation - compiled block : 156 +-Memory allocation - code portion : 20 ++Memory allocation - code size : 20 + ------------------------------------------------------------------ + 0 2 Bra + 2 2 Ket +@@ -78,8 +73,7 @@ Options: extended + Subject length lower bound = 0 + + /a#/Ix +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 a +@@ -92,8 +86,7 @@ First code unit = 'a' + Subject length lower bound = 1 + + /x?+/ +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 x?+ +@@ -102,8 +95,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /x++/ +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 x++ +@@ -112,8 +104,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /x{1,3}+/ +-Memory allocation - compiled block : 176 +-Memory allocation - code portion : 40 ++Memory allocation - code size : 40 + ------------------------------------------------------------------ + 0 7 Bra + 2 x +@@ -123,8 +114,7 @@ Memory allocation - code portion : 40 + ------------------------------------------------------------------ + + /(x)*+/ +-Memory allocation - compiled block : 188 +-Memory allocation - code portion : 52 ++Memory allocation - code size : 52 + ------------------------------------------------------------------ + 0 10 Bra + 2 Braposzero +@@ -136,8 +126,7 @@ Memory allocation - code portion : 52 + ------------------------------------------------------------------ + + /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/ +-Memory allocation - compiled block : 356 +-Memory allocation - code portion : 220 ++Memory allocation - code size : 220 + ------------------------------------------------------------------ + 0 52 Bra + 2 ^ +@@ -160,8 +149,7 @@ Memory allocation - code portion : 220 + ------------------------------------------------------------------ + + "8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b" +-Memory allocation - compiled block : 3432 +-Memory allocation - code portion : 3296 ++Memory allocation - code size : 3296 + ------------------------------------------------------------------ + 0 821 Bra + 2 8J$WE<.rX+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDDqmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X +@@ -171,8 +159,7 @@ Memory allocation - code portion : 3296 + ------------------------------------------------------------------ + + "\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b" +-Memory allocation - compiled block : 3392 +-Memory allocation - code portion : 3256 ++Memory allocation - code size : 3256 + ------------------------------------------------------------------ + 0 811 Bra + 2 $<.X+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDDqmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X +@@ -182,8 +169,7 @@ Memory allocation - code portion : 3256 + ------------------------------------------------------------------ + + /(a(?1)b)/ +-Memory allocation - compiled block : 200 +-Memory allocation - code portion : 64 ++Memory allocation - code size : 64 + ------------------------------------------------------------------ + 0 13 Bra + 2 9 CBra 1 +@@ -196,8 +182,7 @@ Memory allocation - code portion : 64 + ------------------------------------------------------------------ + + /(a(?1)+b)/ +-Memory allocation - compiled block : 216 +-Memory allocation - code portion : 80 ++Memory allocation - code size : 80 + ------------------------------------------------------------------ + 0 17 Bra + 2 13 CBra 1 +@@ -212,8 +197,8 @@ Memory allocation - code portion : 80 + ------------------------------------------------------------------ + + /a(?Pb|c)d(?Pe)/ +-Memory allocation - compiled block : 348 +-Memory allocation - code portion : 108 ++Memory allocation - code size : 108 ++Memory allocation - data size : 104 + ------------------------------------------------------------------ + 0 24 Bra + 2 a +@@ -231,8 +216,8 @@ Memory allocation - code portion : 108 + ------------------------------------------------------------------ + + /(?:a(?Pc(?Pd)))(?Pa)/ +-Memory allocation - compiled block : 300 +-Memory allocation - code portion : 128 ++Memory allocation - code size : 128 ++Memory allocation - data size : 36 + ------------------------------------------------------------------ + 0 29 Bra + 2 18 Bra +@@ -252,8 +237,8 @@ Memory allocation - code portion : 128 + ------------------------------------------------------------------ + + /(?Pa)...(?P=a)bbb(?P>a)d/ +-Memory allocation - compiled block : 256 +-Memory allocation - code portion : 108 ++Memory allocation - code size : 108 ++Memory allocation - data size : 12 + ------------------------------------------------------------------ + 0 24 Bra + 2 5 CBra 1 +@@ -271,8 +256,7 @@ Memory allocation - code portion : 108 + ------------------------------------------------------------------ + + /abc(?C255)de(?C)f/ +-Memory allocation - compiled block : 236 +-Memory allocation - code portion : 100 ++Memory allocation - code size : 100 + ------------------------------------------------------------------ + 0 22 Bra + 2 abc +@@ -285,8 +269,7 @@ Memory allocation - code portion : 100 + ------------------------------------------------------------------ + + /abcde/auto_callout +-Memory allocation - compiled block : 292 +-Memory allocation - code portion : 156 ++Memory allocation - code size : 156 + ------------------------------------------------------------------ + 0 36 Bra + 2 Callout 255 0 1 +@@ -305,8 +288,7 @@ Memory allocation - code portion : 156 + ------------------------------------------------------------------ + + /\x{100}/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{100} +@@ -315,8 +297,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /\x{1000}/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{1000} +@@ -325,8 +306,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /\x{10000}/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{10000} +@@ -335,8 +315,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /\x{100000}/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{100000} +@@ -345,8 +324,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /\x{10ffff}/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{10ffff} +@@ -358,8 +336,7 @@ Memory allocation - code portion : 28 + Failed: error 134 at offset 9: character code point value in \x{} or \o{} is too large + + /[\x{ff}]/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{ff} +@@ -368,8 +345,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[\x{100}]/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{100} +@@ -378,8 +354,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /\x80/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{80} +@@ -388,8 +363,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /\xff/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{ff} +@@ -398,8 +372,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /\x{0041}\x{2262}\x{0391}\x{002e}/I,utf +-Memory allocation - compiled block : 188 +-Memory allocation - code portion : 52 ++Memory allocation - code size : 52 + ------------------------------------------------------------------ + 0 10 Bra + 2 A\x{2262}\x{391}. +@@ -413,8 +386,7 @@ Last code unit = '.' + Subject length lower bound = 4 + + /\x{D55c}\x{ad6d}\x{C5B4}/I,utf +-Memory allocation - compiled block : 180 +-Memory allocation - code portion : 44 ++Memory allocation - code size : 44 + ------------------------------------------------------------------ + 0 8 Bra + 2 \x{d55c}\x{ad6d}\x{c5b4} +@@ -428,8 +400,7 @@ Last code unit = \x{c5b4} + Subject length lower bound = 3 + + /\x{65e5}\x{672c}\x{8a9e}/I,utf +-Memory allocation - compiled block : 180 +-Memory allocation - code portion : 44 ++Memory allocation - code size : 44 + ------------------------------------------------------------------ + 0 8 Bra + 2 \x{65e5}\x{672c}\x{8a9e} +@@ -443,8 +414,7 @@ Last code unit = \x{8a9e} + Subject length lower bound = 3 + + /[\x{100}]/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{100} +@@ -453,8 +423,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[Z\x{100}]/utf +-Memory allocation - compiled block : 212 +-Memory allocation - code portion : 76 ++Memory allocation - code size : 76 + ------------------------------------------------------------------ + 0 16 Bra + 2 [Z\x{100}] +@@ -463,8 +432,7 @@ Memory allocation - code portion : 76 + ------------------------------------------------------------------ + + /^[\x{100}\E-\Q\E\x{150}]/utf +-Memory allocation - compiled block : 188 +-Memory allocation - code portion : 52 ++Memory allocation - code size : 52 + ------------------------------------------------------------------ + 0 10 Bra + 2 ^ +@@ -474,8 +442,7 @@ Memory allocation - code portion : 52 + ------------------------------------------------------------------ + + /^[\QĀ\E-\QŐ\E]/utf +-Memory allocation - compiled block : 188 +-Memory allocation - code portion : 52 ++Memory allocation - code size : 52 + ------------------------------------------------------------------ + 0 10 Bra + 2 ^ +@@ -488,8 +455,7 @@ Memory allocation - code portion : 52 + Failed: error 106 at offset 13: missing terminating ] for character class + + /[\p{L}]/ +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\p{L}] +@@ -498,8 +464,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /[\p{^L}]/ +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\P{L}] +@@ -508,8 +473,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /[\P{L}]/ +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\P{L}] +@@ -518,8 +482,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /[\P{^L}]/ +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\p{L}] +@@ -528,8 +491,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /[abc\p{L}\x{0660}]/utf +-Memory allocation - compiled block : 224 +-Memory allocation - code portion : 88 ++Memory allocation - code size : 88 + ------------------------------------------------------------------ + 0 19 Bra + 2 [a-c\p{L}\x{660}] +@@ -538,8 +500,7 @@ Memory allocation - code portion : 88 + ------------------------------------------------------------------ + + /[\p{Nd}]/utf +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\p{Nd}] +@@ -548,8 +509,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /[\p{Nd}+-]+/utf +-Memory allocation - compiled block : 220 +-Memory allocation - code portion : 84 ++Memory allocation - code size : 84 + ------------------------------------------------------------------ + 0 18 Bra + 2 [+\-\p{Nd}]++ +@@ -558,8 +518,7 @@ Memory allocation - code portion : 84 + ------------------------------------------------------------------ + + /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf +-Memory allocation - compiled block : 196 +-Memory allocation - code portion : 60 ++Memory allocation - code size : 60 + ------------------------------------------------------------------ + 0 12 Bra + 2 /i A\x{391}\x{10427}\x{ff3a}\x{1fb0} +@@ -568,8 +527,7 @@ Memory allocation - code portion : 60 + ------------------------------------------------------------------ + + /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf +-Memory allocation - compiled block : 196 +-Memory allocation - code portion : 60 ++Memory allocation - code size : 60 + ------------------------------------------------------------------ + 0 12 Bra + 2 A\x{391}\x{10427}\x{ff3a}\x{1fb0} +@@ -578,8 +536,7 @@ Memory allocation - code portion : 60 + ------------------------------------------------------------------ + + /[\x{105}-\x{109}]/i,utf +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 9 Bra + 2 [\x{104}-\x{109}] +@@ -588,8 +545,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /( ( (?(1)0|) )* )/x +-Memory allocation - compiled block : 240 +-Memory allocation - code portion : 104 ++Memory allocation - code size : 104 + ------------------------------------------------------------------ + 0 23 Bra + 2 19 CBra 1 +@@ -607,8 +563,7 @@ Memory allocation - code portion : 104 + ------------------------------------------------------------------ + + /( (?(1)0|)* )/x +-Memory allocation - compiled block : 220 +-Memory allocation - code portion : 84 ++Memory allocation - code size : 84 + ------------------------------------------------------------------ + 0 18 Bra + 2 14 CBra 1 +@@ -624,8 +579,7 @@ Memory allocation - code portion : 84 + ------------------------------------------------------------------ + + /[a]/ +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 a +@@ -634,8 +588,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[a]/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 a +@@ -644,8 +597,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[\xaa]/ +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{aa} +@@ -654,8 +606,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[\xaa]/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 \x{aa} +@@ -664,8 +615,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[^a]/ +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 [^a] +@@ -674,8 +624,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[^a]/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 [^a] +@@ -684,8 +633,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[^\xaa]/ +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 [^\x{aa}] +@@ -694,8 +642,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /[^\xaa]/utf +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 4 Bra + 2 [^\x{aa}] +diff --git a/testdata/testoutput8-8-2 b/testdata/testoutput8-8-2 +index f3811d95..779552ac 100644 +--- a/testdata/testoutput8-8-2 ++++ b/testdata/testoutput8-8-2 +@@ -10,8 +10,7 @@ + #pattern fullbincode,memory + + /((?i)b)/ +-Memory allocation - compiled block : 153 +-Memory allocation - code portion : 17 ++Memory allocation - code size : 17 + ------------------------------------------------------------------ + 0 13 Bra + 3 7 CBra 1 +@@ -22,8 +21,7 @@ Memory allocation - code portion : 17 + ------------------------------------------------------------------ + + /(?s)(.*X|^B)/ +-Memory allocation - compiled block : 161 +-Memory allocation - code portion : 25 ++Memory allocation - code size : 25 + ------------------------------------------------------------------ + 0 21 Bra + 3 9 CBra 1 +@@ -38,8 +36,7 @@ Memory allocation - code portion : 25 + ------------------------------------------------------------------ + + /(?s:.*X|^B)/ +-Memory allocation - compiled block : 159 +-Memory allocation - code portion : 23 ++Memory allocation - code size : 23 + ------------------------------------------------------------------ + 0 19 Bra + 3 7 Bra +@@ -54,8 +51,7 @@ Memory allocation - code portion : 23 + ------------------------------------------------------------------ + + /^[[:alnum:]]/ +-Memory allocation - compiled block : 177 +-Memory allocation - code portion : 41 ++Memory allocation - code size : 41 + ------------------------------------------------------------------ + 0 37 Bra + 3 ^ +@@ -65,8 +61,7 @@ Memory allocation - code portion : 41 + ------------------------------------------------------------------ + + /#/Ix +-Memory allocation - compiled block : 143 +-Memory allocation - code portion : 7 ++Memory allocation - code size : 7 + ------------------------------------------------------------------ + 0 3 Bra + 3 3 Ket +@@ -78,8 +73,7 @@ Options: extended + Subject length lower bound = 0 + + /a#/Ix +-Memory allocation - compiled block : 145 +-Memory allocation - code portion : 9 ++Memory allocation - code size : 9 + ------------------------------------------------------------------ + 0 5 Bra + 3 a +@@ -92,8 +86,7 @@ First code unit = 'a' + Subject length lower bound = 1 + + /x?+/ +-Memory allocation - compiled block : 145 +-Memory allocation - code portion : 9 ++Memory allocation - code size : 9 + ------------------------------------------------------------------ + 0 5 Bra + 3 x?+ +@@ -102,8 +95,7 @@ Memory allocation - code portion : 9 + ------------------------------------------------------------------ + + /x++/ +-Memory allocation - compiled block : 145 +-Memory allocation - code portion : 9 ++Memory allocation - code size : 9 + ------------------------------------------------------------------ + 0 5 Bra + 3 x++ +@@ -112,8 +104,7 @@ Memory allocation - code portion : 9 + ------------------------------------------------------------------ + + /x{1,3}+/ +-Memory allocation - compiled block : 149 +-Memory allocation - code portion : 13 ++Memory allocation - code size : 13 + ------------------------------------------------------------------ + 0 9 Bra + 3 x +@@ -123,8 +114,7 @@ Memory allocation - code portion : 13 + ------------------------------------------------------------------ + + /(x)*+/ +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 14 Bra + 3 Braposzero +@@ -136,8 +126,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/ +-Memory allocation - compiled block : 256 +-Memory allocation - code portion : 120 ++Memory allocation - code size : 120 + ------------------------------------------------------------------ + 0 116 Bra + 3 ^ +@@ -160,8 +149,7 @@ Memory allocation - code portion : 120 + ------------------------------------------------------------------ + + "8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b" +-Memory allocation - compiled block : 962 +-Memory allocation - code portion : 826 ++Memory allocation - code size : 826 + ------------------------------------------------------------------ + 0 822 Bra + 3 8J$WE<.rX+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDDqmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X +@@ -171,8 +159,7 @@ Memory allocation - code portion : 826 + ------------------------------------------------------------------ + + "\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b" +-Memory allocation - compiled block : 952 +-Memory allocation - code portion : 816 ++Memory allocation - code size : 816 + ------------------------------------------------------------------ + 0 812 Bra + 3 $<.X+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDDqmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X +@@ -182,8 +169,7 @@ Memory allocation - code portion : 816 + ------------------------------------------------------------------ + + /(a(?1)b)/ +-Memory allocation - compiled block : 158 +-Memory allocation - code portion : 22 ++Memory allocation - code size : 22 + ------------------------------------------------------------------ + 0 18 Bra + 3 12 CBra 1 +@@ -196,8 +182,7 @@ Memory allocation - code portion : 22 + ------------------------------------------------------------------ + + /(a(?1)+b)/ +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 24 Bra + 3 18 CBra 1 +@@ -212,8 +197,8 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /a(?Pb|c)d(?Pe)/ +-Memory allocation - compiled block : 200 +-Memory allocation - code portion : 36 ++Memory allocation - code size : 36 ++Memory allocation - data size : 28 + ------------------------------------------------------------------ + 0 32 Bra + 3 a +@@ -231,8 +216,8 @@ Memory allocation - code portion : 36 + ------------------------------------------------------------------ + + /(?:a(?Pc(?Pd)))(?Pa)/ +-Memory allocation - compiled block : 193 +-Memory allocation - code portion : 45 ++Memory allocation - code size : 45 ++Memory allocation - data size : 12 + ------------------------------------------------------------------ + 0 41 Bra + 3 25 Bra +@@ -252,8 +237,8 @@ Memory allocation - code portion : 45 + ------------------------------------------------------------------ + + /(?Pa)...(?P=a)bbb(?P>a)d/ +-Memory allocation - compiled block : 174 +-Memory allocation - code portion : 34 ++Memory allocation - code size : 34 ++Memory allocation - data size : 4 + ------------------------------------------------------------------ + 0 30 Bra + 3 7 CBra 1 +@@ -271,8 +256,7 @@ Memory allocation - code portion : 34 + ------------------------------------------------------------------ + + /abc(?C255)de(?C)f/ +-Memory allocation - compiled block : 167 +-Memory allocation - code portion : 31 ++Memory allocation - code size : 31 + ------------------------------------------------------------------ + 0 27 Bra + 3 abc +@@ -285,8 +269,7 @@ Memory allocation - code portion : 31 + ------------------------------------------------------------------ + + /abcde/auto_callout +-Memory allocation - compiled block : 189 +-Memory allocation - code portion : 53 ++Memory allocation - code size : 53 + ------------------------------------------------------------------ + 0 49 Bra + 3 Callout 255 0 1 +@@ -305,8 +288,7 @@ Memory allocation - code portion : 53 + ------------------------------------------------------------------ + + /\x{100}/utf +-Memory allocation - compiled block : 146 +-Memory allocation - code portion : 10 ++Memory allocation - code size : 10 + ------------------------------------------------------------------ + 0 6 Bra + 3 \x{100} +@@ -315,8 +297,7 @@ Memory allocation - code portion : 10 + ------------------------------------------------------------------ + + /\x{1000}/utf +-Memory allocation - compiled block : 147 +-Memory allocation - code portion : 11 ++Memory allocation - code size : 11 + ------------------------------------------------------------------ + 0 7 Bra + 3 \x{1000} +@@ -325,8 +306,7 @@ Memory allocation - code portion : 11 + ------------------------------------------------------------------ + + /\x{10000}/utf +-Memory allocation - compiled block : 148 +-Memory allocation - code portion : 12 ++Memory allocation - code size : 12 + ------------------------------------------------------------------ + 0 8 Bra + 3 \x{10000} +@@ -335,8 +315,7 @@ Memory allocation - code portion : 12 + ------------------------------------------------------------------ + + /\x{100000}/utf +-Memory allocation - compiled block : 148 +-Memory allocation - code portion : 12 ++Memory allocation - code size : 12 + ------------------------------------------------------------------ + 0 8 Bra + 3 \x{100000} +@@ -345,8 +324,7 @@ Memory allocation - code portion : 12 + ------------------------------------------------------------------ + + /\x{10ffff}/utf +-Memory allocation - compiled block : 148 +-Memory allocation - code portion : 12 ++Memory allocation - code size : 12 + ------------------------------------------------------------------ + 0 8 Bra + 3 \x{10ffff} +@@ -358,8 +336,7 @@ Memory allocation - code portion : 12 + Failed: error 134 at offset 9: character code point value in \x{} or \o{} is too large + + /[\x{ff}]/utf +-Memory allocation - compiled block : 146 +-Memory allocation - code portion : 10 ++Memory allocation - code size : 10 + ------------------------------------------------------------------ + 0 6 Bra + 3 \x{ff} +@@ -368,8 +345,7 @@ Memory allocation - code portion : 10 + ------------------------------------------------------------------ + + /[\x{100}]/utf +-Memory allocation - compiled block : 146 +-Memory allocation - code portion : 10 ++Memory allocation - code size : 10 + ------------------------------------------------------------------ + 0 6 Bra + 3 \x{100} +@@ -378,8 +354,7 @@ Memory allocation - code portion : 10 + ------------------------------------------------------------------ + + /\x80/utf +-Memory allocation - compiled block : 146 +-Memory allocation - code portion : 10 ++Memory allocation - code size : 10 + ------------------------------------------------------------------ + 0 6 Bra + 3 \x{80} +@@ -388,8 +363,7 @@ Memory allocation - code portion : 10 + ------------------------------------------------------------------ + + /\xff/utf +-Memory allocation - compiled block : 146 +-Memory allocation - code portion : 10 ++Memory allocation - code size : 10 + ------------------------------------------------------------------ + 0 6 Bra + 3 \x{ff} +@@ -398,8 +372,7 @@ Memory allocation - code portion : 10 + ------------------------------------------------------------------ + + /\x{0041}\x{2262}\x{0391}\x{002e}/I,utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 14 Bra + 3 A\x{2262}\x{391}. +@@ -413,8 +386,7 @@ Last code unit = '.' + Subject length lower bound = 4 + + /\x{D55c}\x{ad6d}\x{C5B4}/I,utf +-Memory allocation - compiled block : 155 +-Memory allocation - code portion : 19 ++Memory allocation - code size : 19 + ------------------------------------------------------------------ + 0 15 Bra + 3 \x{d55c}\x{ad6d}\x{c5b4} +@@ -428,8 +400,7 @@ Last code unit = \xb4 + Subject length lower bound = 3 + + /\x{65e5}\x{672c}\x{8a9e}/I,utf +-Memory allocation - compiled block : 155 +-Memory allocation - code portion : 19 ++Memory allocation - code size : 19 + ------------------------------------------------------------------ + 0 15 Bra + 3 \x{65e5}\x{672c}\x{8a9e} +@@ -443,8 +414,7 @@ Last code unit = \x9e + Subject length lower bound = 3 + + /[\x{100}]/utf +-Memory allocation - compiled block : 146 +-Memory allocation - code portion : 10 ++Memory allocation - code size : 10 + ------------------------------------------------------------------ + 0 6 Bra + 3 \x{100} +@@ -453,8 +423,7 @@ Memory allocation - code portion : 10 + ------------------------------------------------------------------ + + /[Z\x{100}]/utf +-Memory allocation - compiled block : 183 +-Memory allocation - code portion : 47 ++Memory allocation - code size : 47 + ------------------------------------------------------------------ + 0 43 Bra + 3 [Z\x{100}] +@@ -463,8 +432,7 @@ Memory allocation - code portion : 47 + ------------------------------------------------------------------ + + /^[\x{100}\E-\Q\E\x{150}]/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 14 Bra + 3 ^ +@@ -474,8 +442,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /^[\QĀ\E-\QŐ\E]/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 14 Bra + 3 ^ +@@ -488,8 +455,7 @@ Memory allocation - code portion : 18 + Failed: error 106 at offset 15: missing terminating ] for character class + + /[\p{L}]/ +-Memory allocation - compiled block : 151 +-Memory allocation - code portion : 15 ++Memory allocation - code size : 15 + ------------------------------------------------------------------ + 0 11 Bra + 3 [\p{L}] +@@ -498,8 +464,7 @@ Memory allocation - code portion : 15 + ------------------------------------------------------------------ + + /[\p{^L}]/ +-Memory allocation - compiled block : 151 +-Memory allocation - code portion : 15 ++Memory allocation - code size : 15 + ------------------------------------------------------------------ + 0 11 Bra + 3 [\P{L}] +@@ -508,8 +473,7 @@ Memory allocation - code portion : 15 + ------------------------------------------------------------------ + + /[\P{L}]/ +-Memory allocation - compiled block : 151 +-Memory allocation - code portion : 15 ++Memory allocation - code size : 15 + ------------------------------------------------------------------ + 0 11 Bra + 3 [\P{L}] +@@ -518,8 +482,7 @@ Memory allocation - code portion : 15 + ------------------------------------------------------------------ + + /[\P{^L}]/ +-Memory allocation - compiled block : 151 +-Memory allocation - code portion : 15 ++Memory allocation - code size : 15 + ------------------------------------------------------------------ + 0 11 Bra + 3 [\p{L}] +@@ -528,8 +491,7 @@ Memory allocation - code portion : 15 + ------------------------------------------------------------------ + + /[abc\p{L}\x{0660}]/utf +-Memory allocation - compiled block : 186 +-Memory allocation - code portion : 50 ++Memory allocation - code size : 50 + ------------------------------------------------------------------ + 0 46 Bra + 3 [a-c\p{L}\x{660}] +@@ -538,8 +500,7 @@ Memory allocation - code portion : 50 + ------------------------------------------------------------------ + + /[\p{Nd}]/utf +-Memory allocation - compiled block : 151 +-Memory allocation - code portion : 15 ++Memory allocation - code size : 15 + ------------------------------------------------------------------ + 0 11 Bra + 3 [\p{Nd}] +@@ -548,8 +509,7 @@ Memory allocation - code portion : 15 + ------------------------------------------------------------------ + + /[\p{Nd}+-]+/utf +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 48 ++Memory allocation - code size : 48 + ------------------------------------------------------------------ + 0 44 Bra + 3 [+\-\p{Nd}]++ +@@ -558,8 +518,7 @@ Memory allocation - code portion : 48 + ------------------------------------------------------------------ + + /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf +-Memory allocation - compiled block : 161 +-Memory allocation - code portion : 25 ++Memory allocation - code size : 25 + ------------------------------------------------------------------ + 0 21 Bra + 3 /i A\x{391}\x{10427}\x{ff3a}\x{1fb0} +@@ -568,8 +527,7 @@ Memory allocation - code portion : 25 + ------------------------------------------------------------------ + + /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf +-Memory allocation - compiled block : 161 +-Memory allocation - code portion : 25 ++Memory allocation - code size : 25 + ------------------------------------------------------------------ + 0 21 Bra + 3 A\x{391}\x{10427}\x{ff3a}\x{1fb0} +@@ -578,8 +536,7 @@ Memory allocation - code portion : 25 + ------------------------------------------------------------------ + + /[\x{105}-\x{109}]/i,utf +-Memory allocation - compiled block : 153 +-Memory allocation - code portion : 17 ++Memory allocation - code size : 17 + ------------------------------------------------------------------ + 0 13 Bra + 3 [\x{104}-\x{109}] +@@ -588,8 +545,7 @@ Memory allocation - code portion : 17 + ------------------------------------------------------------------ + + /( ( (?(1)0|) )* )/x +-Memory allocation - compiled block : 174 +-Memory allocation - code portion : 38 ++Memory allocation - code size : 38 + ------------------------------------------------------------------ + 0 34 Bra + 3 28 CBra 1 +@@ -607,8 +563,7 @@ Memory allocation - code portion : 38 + ------------------------------------------------------------------ + + /( (?(1)0|)* )/x +-Memory allocation - compiled block : 166 +-Memory allocation - code portion : 30 ++Memory allocation - code size : 30 + ------------------------------------------------------------------ + 0 26 Bra + 3 20 CBra 1 +@@ -624,8 +579,7 @@ Memory allocation - code portion : 30 + ------------------------------------------------------------------ + + /[a]/ +-Memory allocation - compiled block : 145 +-Memory allocation - code portion : 9 ++Memory allocation - code size : 9 + ------------------------------------------------------------------ + 0 5 Bra + 3 a +@@ -634,8 +588,7 @@ Memory allocation - code portion : 9 + ------------------------------------------------------------------ + + /[a]/utf +-Memory allocation - compiled block : 145 +-Memory allocation - code portion : 9 ++Memory allocation - code size : 9 + ------------------------------------------------------------------ + 0 5 Bra + 3 a +@@ -644,8 +597,7 @@ Memory allocation - code portion : 9 + ------------------------------------------------------------------ + + /[\xaa]/ +-Memory allocation - compiled block : 145 +-Memory allocation - code portion : 9 ++Memory allocation - code size : 9 + ------------------------------------------------------------------ + 0 5 Bra + 3 \x{aa} +@@ -654,8 +606,7 @@ Memory allocation - code portion : 9 + ------------------------------------------------------------------ + + /[\xaa]/utf +-Memory allocation - compiled block : 146 +-Memory allocation - code portion : 10 ++Memory allocation - code size : 10 + ------------------------------------------------------------------ + 0 6 Bra + 3 \x{aa} +@@ -664,8 +615,7 @@ Memory allocation - code portion : 10 + ------------------------------------------------------------------ + + /[^a]/ +-Memory allocation - compiled block : 145 +-Memory allocation - code portion : 9 ++Memory allocation - code size : 9 + ------------------------------------------------------------------ + 0 5 Bra + 3 [^a] +@@ -674,8 +624,7 @@ Memory allocation - code portion : 9 + ------------------------------------------------------------------ + + /[^a]/utf +-Memory allocation - compiled block : 145 +-Memory allocation - code portion : 9 ++Memory allocation - code size : 9 + ------------------------------------------------------------------ + 0 5 Bra + 3 [^a] +@@ -684,8 +633,7 @@ Memory allocation - code portion : 9 + ------------------------------------------------------------------ + + /[^\xaa]/ +-Memory allocation - compiled block : 145 +-Memory allocation - code portion : 9 ++Memory allocation - code size : 9 + ------------------------------------------------------------------ + 0 5 Bra + 3 [^\x{aa}] +@@ -694,8 +642,7 @@ Memory allocation - code portion : 9 + ------------------------------------------------------------------ + + /[^\xaa]/utf +-Memory allocation - compiled block : 146 +-Memory allocation - code portion : 10 ++Memory allocation - code size : 10 + ------------------------------------------------------------------ + 0 6 Bra + 3 [^\x{aa}] +diff --git a/testdata/testoutput8-8-3 b/testdata/testoutput8-8-3 +index 48e0b8aa..2657ce89 100644 +--- a/testdata/testoutput8-8-3 ++++ b/testdata/testoutput8-8-3 +@@ -10,8 +10,7 @@ + #pattern fullbincode,memory + + /((?i)b)/ +-Memory allocation - compiled block : 157 +-Memory allocation - code portion : 21 ++Memory allocation - code size : 21 + ------------------------------------------------------------------ + 0 16 Bra + 4 8 CBra 1 +@@ -22,8 +21,7 @@ Memory allocation - code portion : 21 + ------------------------------------------------------------------ + + /(?s)(.*X|^B)/ +-Memory allocation - compiled block : 166 +-Memory allocation - code portion : 30 ++Memory allocation - code size : 30 + ------------------------------------------------------------------ + 0 25 Bra + 4 10 CBra 1 +@@ -38,8 +36,7 @@ Memory allocation - code portion : 30 + ------------------------------------------------------------------ + + /(?s:.*X|^B)/ +-Memory allocation - compiled block : 164 +-Memory allocation - code portion : 28 ++Memory allocation - code size : 28 + ------------------------------------------------------------------ + 0 23 Bra + 4 8 Bra +@@ -54,8 +51,7 @@ Memory allocation - code portion : 28 + ------------------------------------------------------------------ + + /^[[:alnum:]]/ +-Memory allocation - compiled block : 179 +-Memory allocation - code portion : 43 ++Memory allocation - code size : 43 + ------------------------------------------------------------------ + 0 38 Bra + 4 ^ +@@ -65,8 +61,7 @@ Memory allocation - code portion : 43 + ------------------------------------------------------------------ + + /#/Ix +-Memory allocation - compiled block : 145 +-Memory allocation - code portion : 9 ++Memory allocation - code size : 9 + ------------------------------------------------------------------ + 0 4 Bra + 4 4 Ket +@@ -78,8 +73,7 @@ Options: extended + Subject length lower bound = 0 + + /a#/Ix +-Memory allocation - compiled block : 147 +-Memory allocation - code portion : 11 ++Memory allocation - code size : 11 + ------------------------------------------------------------------ + 0 6 Bra + 4 a +@@ -92,8 +86,7 @@ First code unit = 'a' + Subject length lower bound = 1 + + /x?+/ +-Memory allocation - compiled block : 147 +-Memory allocation - code portion : 11 ++Memory allocation - code size : 11 + ------------------------------------------------------------------ + 0 6 Bra + 4 x?+ +@@ -102,8 +95,7 @@ Memory allocation - code portion : 11 + ------------------------------------------------------------------ + + /x++/ +-Memory allocation - compiled block : 147 +-Memory allocation - code portion : 11 ++Memory allocation - code size : 11 + ------------------------------------------------------------------ + 0 6 Bra + 4 x++ +@@ -112,8 +104,7 @@ Memory allocation - code portion : 11 + ------------------------------------------------------------------ + + /x{1,3}+/ +-Memory allocation - compiled block : 151 +-Memory allocation - code portion : 15 ++Memory allocation - code size : 15 + ------------------------------------------------------------------ + 0 10 Bra + 4 x +@@ -123,8 +114,7 @@ Memory allocation - code portion : 15 + ------------------------------------------------------------------ + + /(x)*+/ +-Memory allocation - compiled block : 158 +-Memory allocation - code portion : 22 ++Memory allocation - code size : 22 + ------------------------------------------------------------------ + 0 17 Bra + 4 Braposzero +@@ -136,8 +126,7 @@ Memory allocation - code portion : 22 + ------------------------------------------------------------------ + + /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/ +-Memory allocation - compiled block : 268 +-Memory allocation - code portion : 132 ++Memory allocation - code size : 132 + ------------------------------------------------------------------ + 0 127 Bra + 4 ^ +@@ -160,8 +149,7 @@ Memory allocation - code portion : 132 + ------------------------------------------------------------------ + + "8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b" +-Memory allocation - compiled block : 964 +-Memory allocation - code portion : 828 ++Memory allocation - code size : 828 + ------------------------------------------------------------------ + 0 823 Bra + 4 8J$WE<.rX+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDDqmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X +@@ -171,8 +159,7 @@ Memory allocation - code portion : 828 + ------------------------------------------------------------------ + + "\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b" +-Memory allocation - compiled block : 954 +-Memory allocation - code portion : 818 ++Memory allocation - code size : 818 + ------------------------------------------------------------------ + 0 813 Bra + 4 $<.X+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDDqmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X +@@ -182,8 +169,7 @@ Memory allocation - code portion : 818 + ------------------------------------------------------------------ + + /(a(?1)b)/ +-Memory allocation - compiled block : 163 +-Memory allocation - code portion : 27 ++Memory allocation - code size : 27 + ------------------------------------------------------------------ + 0 22 Bra + 4 14 CBra 1 +@@ -196,8 +182,7 @@ Memory allocation - code portion : 27 + ------------------------------------------------------------------ + + /(a(?1)+b)/ +-Memory allocation - compiled block : 171 +-Memory allocation - code portion : 35 ++Memory allocation - code size : 35 + ------------------------------------------------------------------ + 0 30 Bra + 4 22 CBra 1 +@@ -212,8 +197,8 @@ Memory allocation - code portion : 35 + ------------------------------------------------------------------ + + /a(?Pb|c)d(?Pe)/ +-Memory allocation - compiled block : 207 +-Memory allocation - code portion : 43 ++Memory allocation - code size : 43 ++Memory allocation - data size : 28 + ------------------------------------------------------------------ + 0 38 Bra + 4 a +@@ -231,8 +216,8 @@ Memory allocation - code portion : 43 + ------------------------------------------------------------------ + + /(?:a(?Pc(?Pd)))(?Pa)/ +-Memory allocation - compiled block : 203 +-Memory allocation - code portion : 55 ++Memory allocation - code size : 55 ++Memory allocation - data size : 12 + ------------------------------------------------------------------ + 0 50 Bra + 4 30 Bra +@@ -252,8 +237,8 @@ Memory allocation - code portion : 55 + ------------------------------------------------------------------ + + /(?Pa)...(?P=a)bbb(?P>a)d/ +-Memory allocation - compiled block : 179 +-Memory allocation - code portion : 39 ++Memory allocation - code size : 39 ++Memory allocation - data size : 4 + ------------------------------------------------------------------ + 0 34 Bra + 4 8 CBra 1 +@@ -271,8 +256,7 @@ Memory allocation - code portion : 39 + ------------------------------------------------------------------ + + /abc(?C255)de(?C)f/ +-Memory allocation - compiled block : 173 +-Memory allocation - code portion : 37 ++Memory allocation - code size : 37 + ------------------------------------------------------------------ + 0 32 Bra + 4 abc +@@ -285,8 +269,7 @@ Memory allocation - code portion : 37 + ------------------------------------------------------------------ + + /abcde/auto_callout +-Memory allocation - compiled block : 203 +-Memory allocation - code portion : 67 ++Memory allocation - code size : 67 + ------------------------------------------------------------------ + 0 62 Bra + 4 Callout 255 0 1 +@@ -305,8 +288,7 @@ Memory allocation - code portion : 67 + ------------------------------------------------------------------ + + /\x{100}/utf +-Memory allocation - compiled block : 148 +-Memory allocation - code portion : 12 ++Memory allocation - code size : 12 + ------------------------------------------------------------------ + 0 7 Bra + 4 \x{100} +@@ -315,8 +297,7 @@ Memory allocation - code portion : 12 + ------------------------------------------------------------------ + + /\x{1000}/utf +-Memory allocation - compiled block : 149 +-Memory allocation - code portion : 13 ++Memory allocation - code size : 13 + ------------------------------------------------------------------ + 0 8 Bra + 4 \x{1000} +@@ -325,8 +306,7 @@ Memory allocation - code portion : 13 + ------------------------------------------------------------------ + + /\x{10000}/utf +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 9 Bra + 4 \x{10000} +@@ -335,8 +315,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /\x{100000}/utf +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 9 Bra + 4 \x{100000} +@@ -345,8 +324,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /\x{10ffff}/utf +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 9 Bra + 4 \x{10ffff} +@@ -358,8 +336,7 @@ Memory allocation - code portion : 14 + Failed: error 134 at offset 9: character code point value in \x{} or \o{} is too large + + /[\x{ff}]/utf +-Memory allocation - compiled block : 148 +-Memory allocation - code portion : 12 ++Memory allocation - code size : 12 + ------------------------------------------------------------------ + 0 7 Bra + 4 \x{ff} +@@ -368,8 +345,7 @@ Memory allocation - code portion : 12 + ------------------------------------------------------------------ + + /[\x{100}]/utf +-Memory allocation - compiled block : 148 +-Memory allocation - code portion : 12 ++Memory allocation - code size : 12 + ------------------------------------------------------------------ + 0 7 Bra + 4 \x{100} +@@ -378,8 +354,7 @@ Memory allocation - code portion : 12 + ------------------------------------------------------------------ + + /\x80/utf +-Memory allocation - compiled block : 148 +-Memory allocation - code portion : 12 ++Memory allocation - code size : 12 + ------------------------------------------------------------------ + 0 7 Bra + 4 \x{80} +@@ -388,8 +363,7 @@ Memory allocation - code portion : 12 + ------------------------------------------------------------------ + + /\xff/utf +-Memory allocation - compiled block : 148 +-Memory allocation - code portion : 12 ++Memory allocation - code size : 12 + ------------------------------------------------------------------ + 0 7 Bra + 4 \x{ff} +@@ -398,8 +372,7 @@ Memory allocation - code portion : 12 + ------------------------------------------------------------------ + + /\x{0041}\x{2262}\x{0391}\x{002e}/I,utf +-Memory allocation - compiled block : 156 +-Memory allocation - code portion : 20 ++Memory allocation - code size : 20 + ------------------------------------------------------------------ + 0 15 Bra + 4 A\x{2262}\x{391}. +@@ -413,8 +386,7 @@ Last code unit = '.' + Subject length lower bound = 4 + + /\x{D55c}\x{ad6d}\x{C5B4}/I,utf +-Memory allocation - compiled block : 157 +-Memory allocation - code portion : 21 ++Memory allocation - code size : 21 + ------------------------------------------------------------------ + 0 16 Bra + 4 \x{d55c}\x{ad6d}\x{c5b4} +@@ -428,8 +400,7 @@ Last code unit = \xb4 + Subject length lower bound = 3 + + /\x{65e5}\x{672c}\x{8a9e}/I,utf +-Memory allocation - compiled block : 157 +-Memory allocation - code portion : 21 ++Memory allocation - code size : 21 + ------------------------------------------------------------------ + 0 16 Bra + 4 \x{65e5}\x{672c}\x{8a9e} +@@ -443,8 +414,7 @@ Last code unit = \x9e + Subject length lower bound = 3 + + /[\x{100}]/utf +-Memory allocation - compiled block : 148 +-Memory allocation - code portion : 12 ++Memory allocation - code size : 12 + ------------------------------------------------------------------ + 0 7 Bra + 4 \x{100} +@@ -453,8 +423,7 @@ Memory allocation - code portion : 12 + ------------------------------------------------------------------ + + /[Z\x{100}]/utf +-Memory allocation - compiled block : 186 +-Memory allocation - code portion : 50 ++Memory allocation - code size : 50 + ------------------------------------------------------------------ + 0 45 Bra + 4 [Z\x{100}] +@@ -463,8 +432,7 @@ Memory allocation - code portion : 50 + ------------------------------------------------------------------ + + /^[\x{100}\E-\Q\E\x{150}]/utf +-Memory allocation - compiled block : 157 +-Memory allocation - code portion : 21 ++Memory allocation - code size : 21 + ------------------------------------------------------------------ + 0 16 Bra + 4 ^ +@@ -474,8 +442,7 @@ Memory allocation - code portion : 21 + ------------------------------------------------------------------ + + /^[\QĀ\E-\QŐ\E]/utf +-Memory allocation - compiled block : 157 +-Memory allocation - code portion : 21 ++Memory allocation - code size : 21 + ------------------------------------------------------------------ + 0 16 Bra + 4 ^ +@@ -488,8 +455,7 @@ Memory allocation - code portion : 21 + Failed: error 106 at offset 15: missing terminating ] for character class + + /[\p{L}]/ +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 13 Bra + 4 [\p{L}] +@@ -498,8 +464,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[\p{^L}]/ +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 13 Bra + 4 [\P{L}] +@@ -508,8 +473,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[\P{L}]/ +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 13 Bra + 4 [\P{L}] +@@ -518,8 +482,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[\P{^L}]/ +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 13 Bra + 4 [\p{L}] +@@ -528,8 +491,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[abc\p{L}\x{0660}]/utf +-Memory allocation - compiled block : 189 +-Memory allocation - code portion : 53 ++Memory allocation - code size : 53 + ------------------------------------------------------------------ + 0 48 Bra + 4 [a-c\p{L}\x{660}] +@@ -538,8 +500,7 @@ Memory allocation - code portion : 53 + ------------------------------------------------------------------ + + /[\p{Nd}]/utf +-Memory allocation - compiled block : 154 +-Memory allocation - code portion : 18 ++Memory allocation - code size : 18 + ------------------------------------------------------------------ + 0 13 Bra + 4 [\p{Nd}] +@@ -548,8 +509,7 @@ Memory allocation - code portion : 18 + ------------------------------------------------------------------ + + /[\p{Nd}+-]+/utf +-Memory allocation - compiled block : 187 +-Memory allocation - code portion : 51 ++Memory allocation - code size : 51 + ------------------------------------------------------------------ + 0 46 Bra + 4 [+\-\p{Nd}]++ +@@ -558,8 +518,7 @@ Memory allocation - code portion : 51 + ------------------------------------------------------------------ + + /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf +-Memory allocation - compiled block : 163 +-Memory allocation - code portion : 27 ++Memory allocation - code size : 27 + ------------------------------------------------------------------ + 0 22 Bra + 4 /i A\x{391}\x{10427}\x{ff3a}\x{1fb0} +@@ -568,8 +527,7 @@ Memory allocation - code portion : 27 + ------------------------------------------------------------------ + + /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf +-Memory allocation - compiled block : 163 +-Memory allocation - code portion : 27 ++Memory allocation - code size : 27 + ------------------------------------------------------------------ + 0 22 Bra + 4 A\x{391}\x{10427}\x{ff3a}\x{1fb0} +@@ -578,8 +536,7 @@ Memory allocation - code portion : 27 + ------------------------------------------------------------------ + + /[\x{105}-\x{109}]/i,utf +-Memory allocation - compiled block : 156 +-Memory allocation - code portion : 20 ++Memory allocation - code size : 20 + ------------------------------------------------------------------ + 0 15 Bra + 4 [\x{104}-\x{109}] +@@ -588,8 +545,7 @@ Memory allocation - code portion : 20 + ------------------------------------------------------------------ + + /( ( (?(1)0|) )* )/x +-Memory allocation - compiled block : 183 +-Memory allocation - code portion : 47 ++Memory allocation - code size : 47 + ------------------------------------------------------------------ + 0 42 Bra + 4 34 CBra 1 +@@ -607,8 +563,7 @@ Memory allocation - code portion : 47 + ------------------------------------------------------------------ + + /( (?(1)0|)* )/x +-Memory allocation - compiled block : 173 +-Memory allocation - code portion : 37 ++Memory allocation - code size : 37 + ------------------------------------------------------------------ + 0 32 Bra + 4 24 CBra 1 +@@ -624,8 +579,7 @@ Memory allocation - code portion : 37 + ------------------------------------------------------------------ + + /[a]/ +-Memory allocation - compiled block : 147 +-Memory allocation - code portion : 11 ++Memory allocation - code size : 11 + ------------------------------------------------------------------ + 0 6 Bra + 4 a +@@ -634,8 +588,7 @@ Memory allocation - code portion : 11 + ------------------------------------------------------------------ + + /[a]/utf +-Memory allocation - compiled block : 147 +-Memory allocation - code portion : 11 ++Memory allocation - code size : 11 + ------------------------------------------------------------------ + 0 6 Bra + 4 a +@@ -644,8 +597,7 @@ Memory allocation - code portion : 11 + ------------------------------------------------------------------ + + /[\xaa]/ +-Memory allocation - compiled block : 147 +-Memory allocation - code portion : 11 ++Memory allocation - code size : 11 + ------------------------------------------------------------------ + 0 6 Bra + 4 \x{aa} +@@ -654,8 +606,7 @@ Memory allocation - code portion : 11 + ------------------------------------------------------------------ + + /[\xaa]/utf +-Memory allocation - compiled block : 148 +-Memory allocation - code portion : 12 ++Memory allocation - code size : 12 + ------------------------------------------------------------------ + 0 7 Bra + 4 \x{aa} +@@ -664,8 +615,7 @@ Memory allocation - code portion : 12 + ------------------------------------------------------------------ + + /[^a]/ +-Memory allocation - compiled block : 147 +-Memory allocation - code portion : 11 ++Memory allocation - code size : 11 + ------------------------------------------------------------------ + 0 6 Bra + 4 [^a] +@@ -674,8 +624,7 @@ Memory allocation - code portion : 11 + ------------------------------------------------------------------ + + /[^a]/utf +-Memory allocation - compiled block : 147 +-Memory allocation - code portion : 11 ++Memory allocation - code size : 11 + ------------------------------------------------------------------ + 0 6 Bra + 4 [^a] +@@ -684,8 +633,7 @@ Memory allocation - code portion : 11 + ------------------------------------------------------------------ + + /[^\xaa]/ +-Memory allocation - compiled block : 147 +-Memory allocation - code portion : 11 ++Memory allocation - code size : 11 + ------------------------------------------------------------------ + 0 6 Bra + 4 [^\x{aa}] +@@ -694,8 +642,7 @@ Memory allocation - code portion : 11 + ------------------------------------------------------------------ + + /[^\xaa]/utf +-Memory allocation - compiled block : 148 +-Memory allocation - code portion : 12 ++Memory allocation - code size : 12 + ------------------------------------------------------------------ + 0 7 Bra + 4 [^\x{aa}] +diff --git a/testdata/testoutput8-8-4 b/testdata/testoutput8-8-4 +index 81cf0f76..8bfac41a 100644 +--- a/testdata/testoutput8-8-4 ++++ b/testdata/testoutput8-8-4 +@@ -10,8 +10,7 @@ + #pattern fullbincode,memory + + /((?i)b)/ +-Memory allocation - compiled block : 161 +-Memory allocation - code portion : 25 ++Memory allocation - code size : 25 + ------------------------------------------------------------------ + 0 19 Bra + 5 9 CBra 1 +@@ -22,8 +21,7 @@ Memory allocation - code portion : 25 + ------------------------------------------------------------------ + + /(?s)(.*X|^B)/ +-Memory allocation - compiled block : 171 +-Memory allocation - code portion : 35 ++Memory allocation - code size : 35 + ------------------------------------------------------------------ + 0 29 Bra + 5 11 CBra 1 +@@ -38,8 +36,7 @@ Memory allocation - code portion : 35 + ------------------------------------------------------------------ + + /(?s:.*X|^B)/ +-Memory allocation - compiled block : 169 +-Memory allocation - code portion : 33 ++Memory allocation - code size : 33 + ------------------------------------------------------------------ + 0 27 Bra + 5 9 Bra +@@ -54,8 +51,7 @@ Memory allocation - code portion : 33 + ------------------------------------------------------------------ + + /^[[:alnum:]]/ +-Memory allocation - compiled block : 181 +-Memory allocation - code portion : 45 ++Memory allocation - code size : 45 + ------------------------------------------------------------------ + 0 39 Bra + 5 ^ +@@ -65,8 +61,7 @@ Memory allocation - code portion : 45 + ------------------------------------------------------------------ + + /#/Ix +-Memory allocation - compiled block : 147 +-Memory allocation - code portion : 11 ++Memory allocation - code size : 11 + ------------------------------------------------------------------ + 0 5 Bra + 5 5 Ket +@@ -78,8 +73,7 @@ Options: extended + Subject length lower bound = 0 + + /a#/Ix +-Memory allocation - compiled block : 149 +-Memory allocation - code portion : 13 ++Memory allocation - code size : 13 + ------------------------------------------------------------------ + 0 7 Bra + 5 a +@@ -92,8 +86,7 @@ First code unit = 'a' + Subject length lower bound = 1 + + /x?+/ +-Memory allocation - compiled block : 149 +-Memory allocation - code portion : 13 ++Memory allocation - code size : 13 + ------------------------------------------------------------------ + 0 7 Bra + 5 x?+ +@@ -102,8 +95,7 @@ Memory allocation - code portion : 13 + ------------------------------------------------------------------ + + /x++/ +-Memory allocation - compiled block : 149 +-Memory allocation - code portion : 13 ++Memory allocation - code size : 13 + ------------------------------------------------------------------ + 0 7 Bra + 5 x++ +@@ -112,8 +104,7 @@ Memory allocation - code portion : 13 + ------------------------------------------------------------------ + + /x{1,3}+/ +-Memory allocation - compiled block : 153 +-Memory allocation - code portion : 17 ++Memory allocation - code size : 17 + ------------------------------------------------------------------ + 0 11 Bra + 5 x +@@ -123,8 +114,7 @@ Memory allocation - code portion : 17 + ------------------------------------------------------------------ + + /(x)*+/ +-Memory allocation - compiled block : 162 +-Memory allocation - code portion : 26 ++Memory allocation - code size : 26 + ------------------------------------------------------------------ + 0 20 Bra + 5 Braposzero +@@ -136,8 +126,7 @@ Memory allocation - code portion : 26 + ------------------------------------------------------------------ + + /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/ +-Memory allocation - compiled block : 280 +-Memory allocation - code portion : 144 ++Memory allocation - code size : 144 + ------------------------------------------------------------------ + 0 138 Bra + 5 ^ +@@ -160,8 +149,7 @@ Memory allocation - code portion : 144 + ------------------------------------------------------------------ + + "8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b" +-Memory allocation - compiled block : 966 +-Memory allocation - code portion : 830 ++Memory allocation - code size : 830 + ------------------------------------------------------------------ + 0 824 Bra + 5 8J$WE<.rX+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDDqmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X +@@ -171,8 +159,7 @@ Memory allocation - code portion : 830 + ------------------------------------------------------------------ + + "\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b" +-Memory allocation - compiled block : 956 +-Memory allocation - code portion : 820 ++Memory allocation - code size : 820 + ------------------------------------------------------------------ + 0 814 Bra + 5 $<.X+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDDqmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X +@@ -182,8 +169,7 @@ Memory allocation - code portion : 820 + ------------------------------------------------------------------ + + /(a(?1)b)/ +-Memory allocation - compiled block : 168 +-Memory allocation - code portion : 32 ++Memory allocation - code size : 32 + ------------------------------------------------------------------ + 0 26 Bra + 5 16 CBra 1 +@@ -196,8 +182,7 @@ Memory allocation - code portion : 32 + ------------------------------------------------------------------ + + /(a(?1)+b)/ +-Memory allocation - compiled block : 178 +-Memory allocation - code portion : 42 ++Memory allocation - code size : 42 + ------------------------------------------------------------------ + 0 36 Bra + 5 26 CBra 1 +@@ -212,8 +197,8 @@ Memory allocation - code portion : 42 + ------------------------------------------------------------------ + + /a(?Pb|c)d(?Pe)/ +-Memory allocation - compiled block : 214 +-Memory allocation - code portion : 50 ++Memory allocation - code size : 50 ++Memory allocation - data size : 28 + ------------------------------------------------------------------ + 0 44 Bra + 5 a +@@ -231,8 +216,8 @@ Memory allocation - code portion : 50 + ------------------------------------------------------------------ + + /(?:a(?Pc(?Pd)))(?Pa)/ +-Memory allocation - compiled block : 213 +-Memory allocation - code portion : 65 ++Memory allocation - code size : 65 ++Memory allocation - data size : 12 + ------------------------------------------------------------------ + 0 59 Bra + 5 35 Bra +@@ -252,8 +237,8 @@ Memory allocation - code portion : 65 + ------------------------------------------------------------------ + + /(?Pa)...(?P=a)bbb(?P>a)d/ +-Memory allocation - compiled block : 184 +-Memory allocation - code portion : 44 ++Memory allocation - code size : 44 ++Memory allocation - data size : 4 + ------------------------------------------------------------------ + 0 38 Bra + 5 9 CBra 1 +@@ -271,8 +256,7 @@ Memory allocation - code portion : 44 + ------------------------------------------------------------------ + + /abc(?C255)de(?C)f/ +-Memory allocation - compiled block : 179 +-Memory allocation - code portion : 43 ++Memory allocation - code size : 43 + ------------------------------------------------------------------ + 0 37 Bra + 5 abc +@@ -285,8 +269,7 @@ Memory allocation - code portion : 43 + ------------------------------------------------------------------ + + /abcde/auto_callout +-Memory allocation - compiled block : 217 +-Memory allocation - code portion : 81 ++Memory allocation - code size : 81 + ------------------------------------------------------------------ + 0 75 Bra + 5 Callout 255 0 1 +@@ -305,8 +288,7 @@ Memory allocation - code portion : 81 + ------------------------------------------------------------------ + + /\x{100}/utf +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 8 Bra + 5 \x{100} +@@ -315,8 +297,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /\x{1000}/utf +-Memory allocation - compiled block : 151 +-Memory allocation - code portion : 15 ++Memory allocation - code size : 15 + ------------------------------------------------------------------ + 0 9 Bra + 5 \x{1000} +@@ -325,8 +306,7 @@ Memory allocation - code portion : 15 + ------------------------------------------------------------------ + + /\x{10000}/utf +-Memory allocation - compiled block : 152 +-Memory allocation - code portion : 16 ++Memory allocation - code size : 16 + ------------------------------------------------------------------ + 0 10 Bra + 5 \x{10000} +@@ -335,8 +315,7 @@ Memory allocation - code portion : 16 + ------------------------------------------------------------------ + + /\x{100000}/utf +-Memory allocation - compiled block : 152 +-Memory allocation - code portion : 16 ++Memory allocation - code size : 16 + ------------------------------------------------------------------ + 0 10 Bra + 5 \x{100000} +@@ -345,8 +324,7 @@ Memory allocation - code portion : 16 + ------------------------------------------------------------------ + + /\x{10ffff}/utf +-Memory allocation - compiled block : 152 +-Memory allocation - code portion : 16 ++Memory allocation - code size : 16 + ------------------------------------------------------------------ + 0 10 Bra + 5 \x{10ffff} +@@ -358,8 +336,7 @@ Memory allocation - code portion : 16 + Failed: error 134 at offset 9: character code point value in \x{} or \o{} is too large + + /[\x{ff}]/utf +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 8 Bra + 5 \x{ff} +@@ -368,8 +345,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /[\x{100}]/utf +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 8 Bra + 5 \x{100} +@@ -378,8 +354,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /\x80/utf +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 8 Bra + 5 \x{80} +@@ -388,8 +363,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /\xff/utf +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 8 Bra + 5 \x{ff} +@@ -398,8 +372,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /\x{0041}\x{2262}\x{0391}\x{002e}/I,utf +-Memory allocation - compiled block : 158 +-Memory allocation - code portion : 22 ++Memory allocation - code size : 22 + ------------------------------------------------------------------ + 0 16 Bra + 5 A\x{2262}\x{391}. +@@ -413,8 +386,7 @@ Last code unit = '.' + Subject length lower bound = 4 + + /\x{D55c}\x{ad6d}\x{C5B4}/I,utf +-Memory allocation - compiled block : 159 +-Memory allocation - code portion : 23 ++Memory allocation - code size : 23 + ------------------------------------------------------------------ + 0 17 Bra + 5 \x{d55c}\x{ad6d}\x{c5b4} +@@ -428,8 +400,7 @@ Last code unit = \xb4 + Subject length lower bound = 3 + + /\x{65e5}\x{672c}\x{8a9e}/I,utf +-Memory allocation - compiled block : 159 +-Memory allocation - code portion : 23 ++Memory allocation - code size : 23 + ------------------------------------------------------------------ + 0 17 Bra + 5 \x{65e5}\x{672c}\x{8a9e} +@@ -443,8 +414,7 @@ Last code unit = \x9e + Subject length lower bound = 3 + + /[\x{100}]/utf +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 8 Bra + 5 \x{100} +@@ -453,8 +423,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /[Z\x{100}]/utf +-Memory allocation - compiled block : 189 +-Memory allocation - code portion : 53 ++Memory allocation - code size : 53 + ------------------------------------------------------------------ + 0 47 Bra + 5 [Z\x{100}] +@@ -463,8 +432,7 @@ Memory allocation - code portion : 53 + ------------------------------------------------------------------ + + /^[\x{100}\E-\Q\E\x{150}]/utf +-Memory allocation - compiled block : 160 +-Memory allocation - code portion : 24 ++Memory allocation - code size : 24 + ------------------------------------------------------------------ + 0 18 Bra + 5 ^ +@@ -474,8 +442,7 @@ Memory allocation - code portion : 24 + ------------------------------------------------------------------ + + /^[\QĀ\E-\QŐ\E]/utf +-Memory allocation - compiled block : 160 +-Memory allocation - code portion : 24 ++Memory allocation - code size : 24 + ------------------------------------------------------------------ + 0 18 Bra + 5 ^ +@@ -488,8 +455,7 @@ Memory allocation - code portion : 24 + Failed: error 106 at offset 15: missing terminating ] for character class + + /[\p{L}]/ +-Memory allocation - compiled block : 157 +-Memory allocation - code portion : 21 ++Memory allocation - code size : 21 + ------------------------------------------------------------------ + 0 15 Bra + 5 [\p{L}] +@@ -498,8 +464,7 @@ Memory allocation - code portion : 21 + ------------------------------------------------------------------ + + /[\p{^L}]/ +-Memory allocation - compiled block : 157 +-Memory allocation - code portion : 21 ++Memory allocation - code size : 21 + ------------------------------------------------------------------ + 0 15 Bra + 5 [\P{L}] +@@ -508,8 +473,7 @@ Memory allocation - code portion : 21 + ------------------------------------------------------------------ + + /[\P{L}]/ +-Memory allocation - compiled block : 157 +-Memory allocation - code portion : 21 ++Memory allocation - code size : 21 + ------------------------------------------------------------------ + 0 15 Bra + 5 [\P{L}] +@@ -518,8 +482,7 @@ Memory allocation - code portion : 21 + ------------------------------------------------------------------ + + /[\P{^L}]/ +-Memory allocation - compiled block : 157 +-Memory allocation - code portion : 21 ++Memory allocation - code size : 21 + ------------------------------------------------------------------ + 0 15 Bra + 5 [\p{L}] +@@ -528,8 +491,7 @@ Memory allocation - code portion : 21 + ------------------------------------------------------------------ + + /[abc\p{L}\x{0660}]/utf +-Memory allocation - compiled block : 192 +-Memory allocation - code portion : 56 ++Memory allocation - code size : 56 + ------------------------------------------------------------------ + 0 50 Bra + 5 [a-c\p{L}\x{660}] +@@ -538,8 +500,7 @@ Memory allocation - code portion : 56 + ------------------------------------------------------------------ + + /[\p{Nd}]/utf +-Memory allocation - compiled block : 157 +-Memory allocation - code portion : 21 ++Memory allocation - code size : 21 + ------------------------------------------------------------------ + 0 15 Bra + 5 [\p{Nd}] +@@ -548,8 +509,7 @@ Memory allocation - code portion : 21 + ------------------------------------------------------------------ + + /[\p{Nd}+-]+/utf +-Memory allocation - compiled block : 190 +-Memory allocation - code portion : 54 ++Memory allocation - code size : 54 + ------------------------------------------------------------------ + 0 48 Bra + 5 [+\-\p{Nd}]++ +@@ -558,8 +518,7 @@ Memory allocation - code portion : 54 + ------------------------------------------------------------------ + + /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf +-Memory allocation - compiled block : 165 +-Memory allocation - code portion : 29 ++Memory allocation - code size : 29 + ------------------------------------------------------------------ + 0 23 Bra + 5 /i A\x{391}\x{10427}\x{ff3a}\x{1fb0} +@@ -568,8 +527,7 @@ Memory allocation - code portion : 29 + ------------------------------------------------------------------ + + /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf +-Memory allocation - compiled block : 165 +-Memory allocation - code portion : 29 ++Memory allocation - code size : 29 + ------------------------------------------------------------------ + 0 23 Bra + 5 A\x{391}\x{10427}\x{ff3a}\x{1fb0} +@@ -578,8 +536,7 @@ Memory allocation - code portion : 29 + ------------------------------------------------------------------ + + /[\x{105}-\x{109}]/i,utf +-Memory allocation - compiled block : 159 +-Memory allocation - code portion : 23 ++Memory allocation - code size : 23 + ------------------------------------------------------------------ + 0 17 Bra + 5 [\x{104}-\x{109}] +@@ -588,8 +545,7 @@ Memory allocation - code portion : 23 + ------------------------------------------------------------------ + + /( ( (?(1)0|) )* )/x +-Memory allocation - compiled block : 192 +-Memory allocation - code portion : 56 ++Memory allocation - code size : 56 + ------------------------------------------------------------------ + 0 50 Bra + 5 40 CBra 1 +@@ -607,8 +563,7 @@ Memory allocation - code portion : 56 + ------------------------------------------------------------------ + + /( (?(1)0|)* )/x +-Memory allocation - compiled block : 180 +-Memory allocation - code portion : 44 ++Memory allocation - code size : 44 + ------------------------------------------------------------------ + 0 38 Bra + 5 28 CBra 1 +@@ -624,8 +579,7 @@ Memory allocation - code portion : 44 + ------------------------------------------------------------------ + + /[a]/ +-Memory allocation - compiled block : 149 +-Memory allocation - code portion : 13 ++Memory allocation - code size : 13 + ------------------------------------------------------------------ + 0 7 Bra + 5 a +@@ -634,8 +588,7 @@ Memory allocation - code portion : 13 + ------------------------------------------------------------------ + + /[a]/utf +-Memory allocation - compiled block : 149 +-Memory allocation - code portion : 13 ++Memory allocation - code size : 13 + ------------------------------------------------------------------ + 0 7 Bra + 5 a +@@ -644,8 +597,7 @@ Memory allocation - code portion : 13 + ------------------------------------------------------------------ + + /[\xaa]/ +-Memory allocation - compiled block : 149 +-Memory allocation - code portion : 13 ++Memory allocation - code size : 13 + ------------------------------------------------------------------ + 0 7 Bra + 5 \x{aa} +@@ -654,8 +606,7 @@ Memory allocation - code portion : 13 + ------------------------------------------------------------------ + + /[\xaa]/utf +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 8 Bra + 5 \x{aa} +@@ -664,8 +615,7 @@ Memory allocation - code portion : 14 + ------------------------------------------------------------------ + + /[^a]/ +-Memory allocation - compiled block : 149 +-Memory allocation - code portion : 13 ++Memory allocation - code size : 13 + ------------------------------------------------------------------ + 0 7 Bra + 5 [^a] +@@ -674,8 +624,7 @@ Memory allocation - code portion : 13 + ------------------------------------------------------------------ + + /[^a]/utf +-Memory allocation - compiled block : 149 +-Memory allocation - code portion : 13 ++Memory allocation - code size : 13 + ------------------------------------------------------------------ + 0 7 Bra + 5 [^a] +@@ -684,8 +633,7 @@ Memory allocation - code portion : 13 + ------------------------------------------------------------------ + + /[^\xaa]/ +-Memory allocation - compiled block : 149 +-Memory allocation - code portion : 13 ++Memory allocation - code size : 13 + ------------------------------------------------------------------ + 0 7 Bra + 5 [^\x{aa}] +@@ -694,8 +642,7 @@ Memory allocation - code portion : 13 + ------------------------------------------------------------------ + + /[^\xaa]/utf +-Memory allocation - compiled block : 150 +-Memory allocation - code portion : 14 ++Memory allocation - code size : 14 + ------------------------------------------------------------------ + 0 8 Bra + 5 [^\x{aa}] +-- +2.51.2.vfs.0.0 + diff --git a/patches/pcre2-10.47-Fix-for-callback.patch b/patches/pcre2-10.47-Fix-for-callback.patch new file mode 100644 index 000000000..7ec98fe43 --- /dev/null +++ b/patches/pcre2-10.47-Fix-for-callback.patch @@ -0,0 +1,177 @@ +From 39c3fd67ef9ca22c39f128bf476e238b0e886975 Mon Sep 17 00:00:00 2001 +From: Nicholas Wilson +Date: Fri, 26 Sep 2025 11:37:10 +0100 +Subject: [PATCH] Add fix and tests for callback enumerate (#801) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Cherry-pick of commit cc6c84d0207d9d09ca9e42996f0bc50353c03157. + +This is a bug in PCRE2 10.45 and 10.46, not present in 10.44 and earlier. + +The bug is that applications using pcre2_callout_enumerate() will crash badly on patterns with Unicode (ie non-ASCII) character classes. There is an out-of-bounds read of arbitrary length, including misinterpreting the bytes as offsets, allowing the read to jump forwards in memory to pretty much anywhere. + +Applications which call pcre2_callout_enumerate should potentially downgrade to PCRE2 10.44 until we release an update of PCRE2 with the fix. + +Since this function is (clearly!!) not used often by applications, I am not currently treating this as very high severity. There is no way for an attacker to make any application call this function, if it is not currently using it. + +The root cause seems to be commit 24f9d8d (#540). + +--------- + +Co-authored-by: Carlo Marcelo Arenas Belón +--- + src/pcre2_pattern_info.c | 3 +- + src/pcre2test.c | 61 ++++++++++++++++++++++------------------ + 2 files changed, 34 insertions(+), 30 deletions(-) + +diff --git a/src/pcre2_pattern_info.c b/src/pcre2_pattern_info.c +index fe4d3c66..c49eaf69 100644 +--- a/src/pcre2_pattern_info.c ++++ b/src/pcre2_pattern_info.c +@@ -292,8 +292,7 @@ if (re->magic_number != MAGIC_NUMBER) return PCRE2_ERROR_BADMAGIC; + if ((re->flags & (PCRE2_CODE_UNIT_WIDTH/8)) == 0) return PCRE2_ERROR_BADMODE; + + cb.version = 0; +-cc = (PCRE2_SPTR)((const uint8_t *)re + sizeof(pcre2_real_code)) +- + re->name_count * re->name_entry_size; ++cc = (PCRE2_SPTR)((uint8_t *)re + re->code_start); + + while (TRUE) + { +diff --git a/src/pcre2test.c b/src/pcre2test.c +index 80ab4f80..6ac638ce 100644 +--- a/src/pcre2test.c ++++ b/src/pcre2test.c +@@ -512,7 +512,6 @@ so many of them that they are split into two fields. */ + /* Combinations */ + + #define CTL_DEBUG (CTL_FULLBINCODE|CTL_INFO) /* For setting */ +-#define CTL_ANYINFO (CTL_DEBUG|CTL_BINCODE|CTL_CALLOUT_INFO) + #define CTL_ANYGLOB (CTL_ALTGLOBAL|CTL_GLOBAL) + + /* Second control word */ +@@ -4652,6 +4651,16 @@ fprintf(outfile, "%.*s\n", + return 0; + } + ++/* Backport from 10.47 */ ++ ++static int callout_enumerate_function_void(pcre2_callout_enumerate_block_8 *cb, ++ void *callout_data) ++{ ++(void)cb; ++(void)callout_data; ++return 0; ++} ++ + + + /************************************************* +@@ -4671,9 +4680,16 @@ Returns: PR_OK continue processing next line + static int + show_pattern_info(void) + { ++int rc; + uint32_t compile_options, overall_options, extra_options; + BOOL utf = (FLD(compiled_code, overall_options) & PCRE2_UTF) != 0; + ++if ((pat_patctl.control & CTL_MEMORY) != 0) ++ show_memory_info(); ++ ++if ((pat_patctl.control2 & CTL2_FRAMESIZE) != 0) ++ show_framesize(); ++ + if ((pat_patctl.control & (CTL_BINCODE|CTL_FULLBINCODE)) != 0) + { + fprintf(outfile, "------------------------------------------------------------------\n"); +@@ -5016,17 +5032,17 @@ if ((pat_patctl.control & CTL_INFO) != 0) + } + } + +-if ((pat_patctl.control & CTL_CALLOUT_INFO) != 0) ++PCRE2_CALLOUT_ENUMERATE(rc, ++ (((pat_patctl.control & CTL_CALLOUT_INFO) != 0)? callout_callback : ++ /* Exercise the callout enumeration code with a dummy callback to make sure ++ it works. */ ++ callout_enumerate_function_void), 0); ++if (rc != 0) + { +- int errorcode; +- PCRE2_CALLOUT_ENUMERATE(errorcode, callout_callback, 0); +- if (errorcode != 0) +- { +- fprintf(outfile, "Callout enumerate failed: error %d: ", errorcode); +- if (errorcode < 0 && !print_error_message(errorcode, "", "\n")) +- return PR_ABEND; +- return PR_SKIP; +- } ++ fprintf(outfile, "Callout enumerate failed: error %d: ", rc); ++ if (rc < 0 && !print_error_message(rc, "", "\n")) ++ return PR_ABEND; ++ return PR_SKIP; + } + + return PR_OK; +@@ -5230,13 +5246,9 @@ switch(cmd) + { + PCRE2_JIT_COMPILE(jitrc, compiled_code, pat_patctl.jit); + } +- if ((pat_patctl.control & CTL_MEMORY) != 0) show_memory_info(); +- if ((pat_patctl.control2 & CTL2_FRAMESIZE) != 0) show_framesize(); +- if ((pat_patctl.control & CTL_ANYINFO) != 0) +- { +- rc = show_pattern_info(); +- if (rc != PR_OK) return rc; +- } ++ ++ rc = show_pattern_info(); ++ if (rc != PR_OK) return rc; + break; + + /* Save the stack of compiled patterns to a file, then empty the stack. */ +@@ -5395,7 +5407,7 @@ BOOL utf; + uint32_t k; + uint8_t *p = buffer; + unsigned int delimiter = *p++; +-int errorcode; ++int rc, errorcode; + void *use_pat_context; + void *use_pbuffer = NULL; + uint32_t use_forbid_utf = forbid_utf; +@@ -5724,7 +5736,6 @@ local character tables. Neither does it have 16-bit or 32-bit support. */ + if ((pat_patctl.control & CTL_POSIX) != 0) + { + #ifdef SUPPORT_PCRE2_8 +- int rc; + int cflags = 0; + const char *msg = "** Ignored with POSIX interface:"; + #endif +@@ -5931,7 +5942,6 @@ ends up back in the usual place. */ + + if (pat_patctl.convert_type != CONVERT_UNSET) + { +- int rc; + int convert_return = PR_OK; + uint32_t convert_options = pat_patctl.convert_type; + void *converted_pattern; +@@ -6246,13 +6256,8 @@ if ((pat_patctl.control2 & CTL2_NL_SET) != 0) + + /* Output code size and other information if requested. */ + +-if ((pat_patctl.control & CTL_MEMORY) != 0) show_memory_info(); +-if ((pat_patctl.control2 & CTL2_FRAMESIZE) != 0) show_framesize(); +-if ((pat_patctl.control & CTL_ANYINFO) != 0) +- { +- int rc = show_pattern_info(); +- if (rc != PR_OK) return rc; +- } ++rc = show_pattern_info(); ++if (rc != PR_OK) return rc; + + /* The "push" control requests that the compiled pattern be remembered on a + stack. This is mainly for testing the serialization functionality. */ +-- +2.51.2.vfs.0.0 +