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

plans for pcre2 support? #2315

Closed
cpaelzer opened this issue Sep 26, 2018 · 5 comments

Comments

@cpaelzer
Copy link

commented Sep 26, 2018

Issue type - new Lib exploitation/toleration

Hi,
pcre2 was mentioned in the discussion around issue #1865 but not otherwise if I didn't miss something.

pcre2 is available since early 2015 and projects could start considering it stable, but due to a change in the API it usually is more than just changing the include being used.
pcre (8.x) continues to exists, but as bugifx only stream and any new features/development are going into pcre2 (10.x).

Therefore Ubuntu would like to demote pcre in favor of pcre2 at some point, but Freeradius (among other pkgs) would need to be ported to use pcre2.

Therefore I wanted to ask if there are any plans to do so (or not) in your project?
If there is none yet, please feel free to use this issue to track it.

@alandekok

This comment has been minimized.

Copy link
Member

commented Sep 26, 2018

If pcre2 is the new stable version, we should support that.

@arr2036

This comment has been minimized.

Copy link
Member

commented Sep 26, 2018

It'll be pretty easy, all the regex calls we make are abstracted by an internal API.

alandekok added a commit that referenced this issue Sep 26, 2018
autoconf checks for pcre2. Helps with #2315.
Once we update to using the code, the autoconf checks should
be swapped to prefer pcre2 over pcre

@arr2036 arr2036 closed this in 9a97b9c Sep 28, 2018

@arr2036

This comment has been minimized.

Copy link
Member

commented Sep 28, 2018

FWIW libpcre2 is less memory efficient and harder to integrate than libpcre, so from our perspective it's the inferior of the two libraries. Adding support for libpcre2 did not give us any additional functionality. I doubt that libpcre is going to be removed from linux distributions any time soon so I'm really not sure if it's worth backporting to v3.0.x.

alandekok added a commit that referenced this issue Sep 28, 2018
Revert "autoconf checks for pcre2. Helps with #2315."
This reverts commit a7af753.

The pcre2 API is horrific.  Unless there is a desperate need for it,
we would like to avoid it.
@alandekok

This comment has been minimized.

Copy link
Member

commented Sep 28, 2018

We're not going to add pcre2 support for v3. Perhaps we can revisit this if the distributions decide to remove support for pcre.

But the pcre2 API is (to be polite) complex and obtuse. So avoiding useless work is a good thing.

@arr2036

This comment has been minimized.

Copy link
Member

commented Sep 30, 2018

I opened a feature request against libpcre2 https://bugs.exim.org/show_bug.cgi?id=2323. Philip Hazel's proposed fix will at least mean we can be smarter about when the subject is strdup'd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.