Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to pcre2 #515

Merged
merged 10 commits into from
Mar 25, 2023
Merged

Migrate to pcre2 #515

merged 10 commits into from
Mar 25, 2023

Commits on Dec 1, 2022

  1. Replace pcre files with pcre2

    This was done following the steps on in the `NON-AUTOTOOLS-BUILD` file
    found in the root of the pcre2 repository:
    https://github.com/PhilipHazel/pcre2/blob/pcre2-10.40/NON-AUTOTOOLS-BUILD
    tobil4sk committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    c66b180 View commit details
    Browse the repository at this point in the history
  2. Adjust pcre2 config

    tobil4sk committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    433b87f View commit details
    Browse the repository at this point in the history
  3. Update builds to use pcre2

    CMake now has to specify each pcre file individually, as some are not meant to be compiled by themselves.
    tobil4sk committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    12316a3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0914c9d View commit details
    Browse the repository at this point in the history
  5. Remove _16 suffixes

    These were necessary in pcre1 but are handled by PCRE2_CODE_UNIT_WIDTH
    in pcre2
    tobil4sk committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    04e78d5 View commit details
    Browse the repository at this point in the history
  6. Remove MATCH_LIMIT_DEPTH setting altogether

    Since pcre 10.30, pcre2_match no longer uses recursive function calls,
    so this setting should no longer be needed.
    
    This avoids the memory leak caused by having to configure this setting
    using a context structure allocated at run time.
    tobil4sk committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    31e7810 View commit details
    Browse the repository at this point in the history
  7. Add PCRE2_ALT_BSUX to pcre pattern compilation

    This is the pcre2 equivalent of the PCRE_JAVASCRIPT_COMPAT flag we used
    previously. Compare bullet point 4 of the pcre2 compatibility docs:
    https://www.pcre.org/current/doc/html/pcre2compat.html
    to bullet point 5 of the pcre1 compatibility docs:
    https://www.pcre.org/original/doc/html/pcrecompat.html
    tobil4sk committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    734f2dc View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f4101bc View commit details
    Browse the repository at this point in the history
  9. Set other PCRE2 options for JavaScript compat

    `PCRE2_ALT_BSUX`, `PCRE2_ALLOW_EMPTY_CLASS`,
    and `PCRE2_MATCH_UNSET_BACKREF`
    are equivalent to the old `PCRE_JAVASCRIPT_COMPAT`.
    
    See:
    https://lists.exim.org/lurker/message/20150105.162835.0666407a.en.html
    tobil4sk committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    64ea8c6 View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2023

  1. Configuration menu
    Copy the full SHA
    a545af5 View commit details
    Browse the repository at this point in the history