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

Support for PCRE2 #83

Open
istiak101 opened this issue Dec 19, 2021 · 5 comments
Open

Support for PCRE2 #83

istiak101 opened this issue Dec 19, 2021 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@istiak101
Copy link

While building rpm with pcre2-devel on RHEL based distro
-- Checking for module 'libpcre>=8.41' -- Package 'libpcre', required by 'virtual:world', not found -- PCRE version 8.41 or above not found -- PCRE 8.41 or above not found

but on older pcre-devel it detects pcre correctly
-- Checking for module 'libpcre>=8.41' -- Found libpcre, version 8.42 -- PCRE version 8.41 or above

Is it possible to support the newer library?

@markos
Copy link

markos commented Jan 25, 2022

Hi, a migration to the new library should be done, it's in the TODO list. Will close this ticket when the migration is done. Apologies for the inconvenience.

@markos markos added the enhancement New feature or request label Jan 25, 2022
@markos markos added this to the 5.4.10 milestone Mar 23, 2023
@markos markos modified the milestones: 5.4.10, 5.4.11 Sep 5, 2023
@markos markos modified the milestones: 5.4.11, 5.4.12 Nov 16, 2023
@markos
Copy link

markos commented Jan 11, 2024

From some research on migrations to pcre2, this will probably create incompatibilities with hyperscan 5.4, so we will have to create a migration plan and also add an Vectorscan specific API/ABI version string for applications to check. It will be moved to next milestone.

@markos markos modified the milestones: 5.4.12, 5.5+ Jan 11, 2024
@victorjulien
Copy link

At Suricata we've switched to pcre2 in our latest major release, and we've not really noticed many issues. The only one was that pcre2 is by default more picky about "invalid escapes". I later found this flag PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL (https://www.pcre.org/current/doc/html/pcre2_set_compile_extra_options.html) which would probably have fixed those issues. Just FYI.

@markos
Copy link

markos commented Jan 11, 2024

@victorjulien ok, that's good to know, from reading the manuals I was under the impression that there will be many cases where user input might be needed to change, which is the problem basically. It's one thing to change the function calls and quite another to introduce an incompatibility because of a difference in the library, perhaps a period where both versions might be supported should be the best solution.

@todd-richmond
Copy link

we swapped our huge perl application with a few matching c based features using PCRE to PCRE2 with basically no issue other than a few invalid escapes mentioned above. Make sure to enable JIT with pcre2_jit_compile(pattern, PCRE2_JIT_COMPLETE) for better perf, but otherwise the code was pretty much a straight addition of adding "2" in many places ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants