php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77349 prce-jit / bundled pcre versions
Submitted: 2018-12-26 20:29 UTC Modified: 2018-12-28 13:30 UTC
Votes:2
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: spam2 at rhsoft dot net Assigned:
Status: Verified Package: PCRE related
PHP Version: 7.2.13 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2018-12-26 20:29 UTC] spam2 at rhsoft dot net
Description:
------------
PHP 7.2.x configure --help says
--with-pcre-jit Enable PCRE JIT functionality (BUNDLED only)

besides that the bundled version is horrible outdated phpinfo() says jit suüport enabled also when built agianst system pcre-devel

so hwat is state fo play here?

PCRE (Perl Compatible Regular Expressions) Support 	enabled
PCRE Library Version 	8.42 2018-03-20
PCRE JIT Support 	enabled 

PCRE (Perl Compatible Regular Expressions) Support 	enabled
PCRE Library Version 	8.41 2017-07-05
PCRE JIT Support 	enabled 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-12-26 23:02 UTC] cmb@php.net
-Status: Open +Status: Verified
 [2018-12-26 23:02 UTC] cmb@php.net
> so hwat is state fo play here?

If the bundled libpcre is used, it is compiled from scratch with
or without JIT support.  If an external libpcre is used, it has
already been compiled with or without JIT support.  Therefore this
compile time option only applies to bundled libpcre.

Changing to documentation problem.  While we're at it, we also
should update the “Upgrade history of the bundled PCRE library”.
 [2018-12-26 23:05 UTC] nikic@php.net
@cmb: I believe that for external PCRE, --with-pcre-jit still determines whether or not JIT is used. Whether it's available at all depends on the external library, but you can still specify --without-pcre-jit to explicitly disable it (afaik).
 [2018-12-26 23:12 UTC] spam2 at rhsoft dot net
in other words "--with-pcre-jit Enable PCRE JIT functionality (BUNDLED only)" is simply wrong and BTW the "(BUNDLED only)" did not exist before 7.2 in "configure --help" while pcre-jit worked for sure with external pcre given that the huge performacne regression in handling browscap.ini was there with 7.0.x and depended on pcre-jit
 [2018-12-26 23:15 UTC] spam2 at rhsoft dot net
the bundeled 8.41 2017-07-05 should be updated anyways, changelogs why pcre are that reason that distribution hates bundled libraries and in case of pcre loaded multiple times (httpd, mod_security, php) they are even worser

* Do Nov 01 2018 Petr Pisar <ppisar@redhat.com> - 8.42-5
- Fix a subject buffer overread in JIT when UTF is disabled and \X or \R has
  a greater than 1 fixed quantifier
- Fix matching a zero-repeated subroutine call at a start of a pattern
  (upstream bug #2332)

* Mo Sep 03 2018 Petr Pisar <ppisar@redhat.com> - 8.42-4
- Fix anchoring in conditionals with only one branch (upstream bug #2307)

* Mo Aug 20 2018 Petr Pisar <ppisar@redhat.com> - 8.42-3
- Fix autopossessifying a repeated negative class with no characters less than
  256 that is followed by a positive class with only characters less than 256
  (upstream bug #2300)

* Do Jun 28 2018 Petr Pisar <ppisar@redhat.com> - 8.42-2
- Fix handling UTF and start-of-pattern options in C++ wrapper
  (upstream bug #2283)
- Fix an error message and locale handling in pcregrep tool

* Di Mär 20 2018 Petr Pisar <ppisar@redhat.com> - 8.42-1
- 8.42 bump

* Mo Feb 26 2018 Petr Pisar <ppisar@redhat.com> - 8.42-0.2.RC1
- Fix compiler warnings in pcregrep

* Fr Feb 23 2018 Petr Pisar <ppisar@redhat.com> - 8.42-0.1.RC1
- 8.42-RC1 bump

* Di Feb 20 2018 Petr Pisar <ppisar@redhat.com> - 8.41-6
- Fix returning unset groups in POSIX interface if REG_STARTEND has a non-zero
  starting offset (upstream bug #2244)
 [2018-12-28 13:30 UTC] cmb@php.net
> Changing to documentation problem.

Aargh![1]

@nikic I believe you are right wrt. PHP 7.3, but it seems that for
7.2 it is not possible to override available JIT support[2].  If
this is indeed so, it would have merely forgotten to update the
help text – or maybe not even this, since --with-pcre-jit would
not work, if libpcre had been compiled without JIT support; only
--without-pcre-jit would work in all cases.

> the bundeled 8.41 2017-07-05 should be updated anyways, […]

If there are bugs which affect our PCRE binding, yes.  However,
in my opinion, this should be filed as separate issue(s).

[1] <https://bugs.php.net/70464>
[2] <https://github.com/php/php-src/blob/a2cb8228fe57cb8d3db0395fad96d01b1d0cb8bc/ext/pcre/config0.m4#L48-L54>
 [2018-12-28 13:42 UTC] spam2 at rhsoft dot net
here you go: https://bugs.php.net/bug.php?id=77363

there seems in general be the need to point out when bundled libraries are outdated instead just keep them up-to-date like the operating system does when you don't use the bundled stuff at build time
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 23:01:29 2024 UTC