History log of /PHP-8.1/ext/pcre/php_pcre.c (Results 1 – 25 of 627)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 4d91665f 22-Jun-2023 Ilija Tovilo

Revert "Mangle PCRE regex cache key with JIT option"

This reverts commit 466fc78d2c373eae6acad4bd5a4553c5c0d1d18b.


# 466fc78d 08-Jun-2023 Michael Voříšek

Mangle PCRE regex cache key with JIT option

Closes GH-11396


# 66ce2057 29-Mar-2023 Ilija Tovilo

Fix incorrect zval type_flags in preg_replace_callback_array() for immutable arrays

The ZVAL_ARR macro always set the zval type_info to IS_ARRAY_EX, even if the
hash table is immutable.

Fix incorrect zval type_flags in preg_replace_callback_array() for immutable arrays

The ZVAL_ARR macro always set the zval type_info to IS_ARRAY_EX, even if the
hash table is immutable. Since in preg_replace_callback_array() we can return
the passed array directly, and that passed array can be immutable, we need to
reset the type_flags to keep the VM from performing ref-counting on the array.

Fixes GH-10968
Closes GH-10970

show more ...


Revision tags: php-8.1.7RC1, php-8.1.4RC1, php-8.1.3, php-8.1.2RC1
# 60717fcd 29-Nov-2021 Christoph M. Becker

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix #74604: Out of bounds in php_pcre_replace_impl


# 816aa203 29-Nov-2021 Christoph M. Becker

Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
Fix #74604: Out of bounds in php_pcre_replace_impl


# 712fc54e 29-Nov-2021 Christoph M. Becker

Fix #74604: Out of bounds in php_pcre_replace_impl

Trying to allocate a `zend_string` with a length only slighty smaller
than `SIZE_MAX` causes an integer overflow; we make sure that thi

Fix #74604: Out of bounds in php_pcre_replace_impl

Trying to allocate a `zend_string` with a length only slighty smaller
than `SIZE_MAX` causes an integer overflow; we make sure that this
doesn't happen by catering to the maximal overhead of a `zend_string`.

Closes GH-7597.

show more ...

Revision tags: php-8.1.0
# 3ec55d6c 18-Nov-2021 Nikita Popov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Clarify that preg_match_all() cannot return null


# bc6ec0a1 18-Nov-2021 Nikita Popov

Clarify that preg_match_all() cannot return null

Revision tags: php-7.3.33, php-7.3.32
# a6f5c2dc 21-Oct-2021 Remi Collet

fix for pcre2 10.38

# 17aae130 21-Oct-2021 Remi Collet

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
fix for pcre2 10.38
fix for pcre2 10.38


# dd610026 21-Oct-2021 Remi Collet

fix for pcre2 10.38

# 56495ac0 21-Oct-2021 Remi Collet

fix for pcre2 10.38

Revision tags: php-7.3.31, php-7.3.30
# e80dbd5f 12-Jul-2021 Christoph M. Becker

Merge branch 'PHP-8.0'

* PHP-8.0:
Fix #81243: Too much memory is allocated for preg_replace()


# 5fb5a739 12-Jul-2021 Christoph M. Becker

Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
Fix #81243: Too much memory is allocated for preg_replace()


# a6b43086 12-Jul-2021 Christoph M. Becker

Fix #81243: Too much memory is allocated for preg_replace()

Trimming a potentially over-allocated string appears to be reasonable,
so we drop the condition altogether.

We also r

Fix #81243: Too much memory is allocated for preg_replace()

Trimming a potentially over-allocated string appears to be reasonable,
so we drop the condition altogether.

We also re-allocate twice the size needed in the first place, and not
roughly tripple the size.

Closes GH-7231.

show more ...

Revision tags: php-7.3.29
# aff36587 29-Jun-2021 Patrick Allaert

Fixed some spaces used instead of tabs

# f7ab7951 06-Jun-2021 Anatol Belski

pcre: Workaround bug #81101

The way to fix it is to disable certain match start optimizaions. The
observed performance impact appears negligible ATM, compared to the
functional regre

pcre: Workaround bug #81101

The way to fix it is to disable certain match start optimizaions. The
observed performance impact appears negligible ATM, compared to the
functional regression revealed.

A possible side effect might occur if a pattern uses (*COMMIT) or
(*MARK), which is however not a very broadly used syntax in PHP. Still
this should be observed and handled by possibly adding a possibility to
reverse PCRE2_NO_START_OPTIMIZE on the user side.

One test shows a behavior change, where instead of int 0 the match
would produce an error and return false. Except strict comparison
is used, this should be acceptable.

Signed-off-by: Anatol Belski <ab@php.net>
(cherry picked from commit d188ca7688315e3d32d41a32e0ce7b1f9bffb4cf)
Signed-off-by: Anatol Belski <ab@php.net>

show more ...

# 1a1d86d5 06-Jun-2021 Anatol Belski

pcre: Workaround bug #81101

The way to fix it is to disable certain match start optimizaions. The
observed performance impact appears negligible ATM, compared to the
functional regre

pcre: Workaround bug #81101

The way to fix it is to disable certain match start optimizaions. The
observed performance impact appears negligible ATM, compared to the
functional regression revealed.

A possible side effect might occur if a pattern uses (*COMMIT) or
(*MARK), which is however not a very broadly used syntax in PHP. Still
this should be observed and handled by possibly adding a possibility to
reverse PCRE2_NO_START_OPTIMIZE on the user side.

One test shows a behavior change, where instead of int 0 the match
would produce an error and return false. Except strict comparison
is used, this should be acceptable.

Signed-off-by: Anatol Belski <ab@php.net>
(cherry picked from commit d188ca7688315e3d32d41a32e0ce7b1f9bffb4cf)
Signed-off-by: Anatol Belski <ab@php.net>

show more ...

# cfec7a41 06-Jun-2021 Anatol Belski

pcre: Apply upstream patch for bug #81101 to bundled libpcre

Signed-off-by: Anatol Belski <ab@php.net>

# d188ca76 06-Jun-2021 Anatol Belski

pcre: Workaround bug #81101

The way to fix it is to disable certain match start optimizaions. The
observed performance impact appears negligible ATM, compared to the
functional regre

pcre: Workaround bug #81101

The way to fix it is to disable certain match start optimizaions. The
observed performance impact appears negligible ATM, compared to the
functional regression revealed.

A possible side effect might occur if a pattern uses (*COMMIT) or
(*MARK), which is however not a very broadly used syntax in PHP. Still
this should be observed and handled by possibly adding a possibility to
reverse PCRE2_NO_START_OPTIMIZE on the user side.

One test shows a behavior change, where instead of int 0 the match
would produce an error and return false. Except strict comparison
is used, this should be acceptable.

Signed-off-by: Anatol Belski <ab@php.net>

show more ...

# aca6aefd 14-May-2021 George Peter Banyard

Remove 'register' type qualifier (#6980)

The compiler should be smart enough to optimize this on its own

# c40231af 12-May-2021 George Peter Banyard

Mark various functions with void arguments.

This fixes a bunch of [-Wstrict-prototypes] warning,
because in C func() and func(void) have different semantics.

# 01b3fc03 06-May-2021 KsaR

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |

show more ...

Revision tags: php-7.3.28
# 3b88e652 18-Mar-2021 Nikita Popov

Merge branch 'PHP-8.0'

* PHP-8.0:
Fix locale switch back to C in pcre


# 4dce2f83 18-Mar-2021 Nikita Popov

Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
Fix locale switch back to C in pcre


12345678910>>...26