On 1/13/22 4:28 AM, wr...@apache.org wrote:
> Author: wrowe
> Date: Thu Jan 13 03:28:31 2022
> New Revision: 1896976
>
> URL: http://svn.apache.org/viewvc?rev=1896976&view=rev
> Log:
> Propose pcre2 support for backport
>
> Modified:
> httpd/httpd/branches/2.4.x/STATUS
>
> Modified: httpd/httpd/branches/2.4.x/STATUS
> URL:
> http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1896976&r1=1896975&r2=1896976&view=diff
> ==============================================================================
> --- httpd/httpd/branches/2.4.x/STATUS (original)
> +++ httpd/httpd/branches/2.4.x/STATUS Thu Jan 13 03:28:31 2022
> @@ -150,6 +150,35 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
> PATCHES PROPOSED TO BACKPORT FROM TRUNK:
> [ New proposals should be added at the end of the list ]
>
> + *) Support PCRE2 (10.x) in place of PCRE (8.x).
> + Submitted by: wrowe, Petr Pisar [ppisar redhat.com], rjung
> + trunk patches:
> + http://svn.apache.org/r1773454
> + http://svn.apache.org/r1773741
> + http://svn.apache.org/r1773742
> + http://svn.apache.org/r1773839
> + http://svn.apache.org/r1773870
> + http://svn.apache.org/r1773882
> + http://svn.apache.org/r1814662
> + http://svn.apache.org/r1881478
> + summarized/conflicts resolved:
> + https://gist.github.com/wrowe/73f655d13bbe0f12030aa4557e804d8a
> + +1: wrowe
> + wrowe notes that the current code drops optimizations, owing to the fact
> + that the ovector is a required allocation and is no longer allocated on
> + the stack, by design. The correct fix is an apr userdata allocation on
> + the appropriate pool, which would be thread-safe, but the actual API of
> + ap_regexec[_len]() offers us no pool and isn't suitable for httpd-2.4.x.
> + At this time, PCRE 8.45 is EOL and will not receive security updates,
> + and taking ovector and other arrays off the stack was in direct reaction
> + to the patterns of abuse of previous pcre exploits. So this patch
> doesn't
> + wait for httpd-2.4 to be retired, it will need to be adopted without the
> + existing optimiation.
> + jorton: Adding ap_pregexec/_len which pass a pool would also work
> + for internal users of this api; not sure if performance
> + impact is significant from using malloc here.
Are we now finished with improving the PCRE2 capabilities with regards to
allocation / performance?
I see the following revisions that would need to be backported on top of the
above patch:
1897240
1897241
1897244
1897248
1897250
1897260
1897261
1897263
1897386
1897459
1897460
1897461
1897462
1897472
1897543
Did I miss any?
BTW: Backporting r1897460 and r1897472 for child.c of the Windows MPM needs
some close look as a number of changes
to child.c in trunk have not been backported yet:
1801146
1801147
1801635
1801636
1801637
1801639
1801640
1801655
1801656
1801657
1801710
1801747
1801748
1801749
1801753
Regards
RĂ¼diger