Commit Graph

1062 Commits

Author SHA1 Message Date
Máté Kocsis
9099dbd961
Use RETURN_THROWS() after zend_type_error() 2020-01-01 14:23:21 +01:00
Christoph M. Becker
e7e15450ef Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78853: preg_match() may return integer > 1
2019-11-22 19:30:43 +01:00
Christoph M. Becker
cfb643ca2b Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78853: preg_match() may return integer > 1
2019-11-22 19:29:11 +01:00
Christoph M. Becker
e1da72bdf1 Fix #78853: preg_match() may return integer > 1
Commit 54ebebd[1] optimized the match loop, but for this case it has
been overlooked, that we must only loop if we're doing global matching.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=54ebebd686255c5f124af718c966edb392782d4a>
2019-11-22 19:26:26 +01:00
Máté Kocsis
27e83d0fb8
Add union return types for function stubs 2019-11-11 14:54:55 +01:00
Fabien Villepinte
a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00
Nikita Popov
ea6d22cfad Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix php_pcre_mutex_free()
2019-11-07 14:32:03 +01:00
Nikita Popov
e19f0e86dc Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix php_pcre_mutex_free()
2019-11-07 14:31:55 +01:00
Nikita Popov
6dcc0b859f Fix php_pcre_mutex_free()
We should only set the mutex to NULL if we actually freed it.
Due to missing braces non-main threads may currently set it to
NULL first.
2019-11-07 14:31:19 +01:00
Christoph M. Becker
284e993791 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78684: PCRE bug72463_2 test is sending emails on Linux
2019-10-19 12:59:59 +02:00
Christoph M. Becker
26635ed71a Fix #78684: PCRE bug72463_2 test is sending emails on Linux
This test is not supposed to run on non Windows systems; otherwise it
would try to send an email.
2019-10-19 12:59:32 +02:00
Nikita Popov
571a3bfc6c Merge branch 'PHP-7.4' 2019-10-08 16:14:19 +02:00
Nikita Popov
68b26ff8cf Merge branch 'PHP-7.3' into PHP-7.4 2019-10-08 16:14:06 +02:00
Nikita Popov
736af5f660 Merge branch 'PHP-7.2' into PHP-7.3 2019-10-08 16:13:17 +02:00
Sergei Turchanov
a8f60ac9dd Add pcre_get_compiled_regex_cache_ex() with local_aware flag
A new function `pcre_get_compiled_regex_cache_ex()` is introduced,
which allows to compile regexp pattern using the "C" locale instead
of a current locale.

This will be needed to replace setlocale() usage in fileinfo,
which is not thread-safe.
2019-10-08 16:11:55 +02:00
Nikita Popov
9b28553d45 Merge branch 'PHP-7.4' 2019-10-07 13:24:24 +02:00
Nikita Popov
1dbf80bcc2 Merge branch 'PHP-7.3' into PHP-7.4 2019-10-07 13:24:16 +02:00
Nikita Popov
ab61d5caf9 Backport fix for uaf during pcre jit fallback
Backports parts of https://vcs.pcre.org/pcre2?view=revision&revision=1175
fixing https://bugs.exim.org/show_bug.cgi?id=2453.
2019-10-07 13:23:56 +02:00
Nikita Popov
647b1c7fcf Remove most uses of ZEND_PARSE_PARAMETERS_END_EX()
As ZPP now throws, it makes no sense to specify an explicit return
value.
2019-10-07 10:02:18 +02:00
Nikita Popov
43358cc7b6 Merge branch 'PHP-7.4' 2019-10-04 16:04:42 +02:00
Nikita Popov
01b3cc4dee Merge branch 'PHP-7.3' into PHP-7.4 2019-10-04 16:04:34 +02:00
Nikita Popov
1d6e9da743 Improve diagnostic on PCRE JIT mmap failure
Print a more informative message that indicates that this is
likely a permission issue, and also indicate that pcre.jit=0
can be used to work around it.

Also automatically disable the JIT, so that this message is
only shown once.

See bug #78630.
2019-10-04 16:03:38 +02:00
Nikita Popov
2f92957fd3 Convert some notices to warnings
Part of https://wiki.php.net/rfc/engine_warnings.
2019-10-02 10:34:08 +02:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Nikita Popov
0b4e007253 Merge branch 'PHP-7.4' 2019-09-18 16:37:23 +02:00
Nikita Popov
38ae522440 Merge branch 'PHP-7.3' into PHP-7.4 2019-09-18 16:37:14 +02:00
Nikita Popov
85b001974a Remove unstable test output
This may be printed in a different order, and we don't care about
it anyway.
2019-09-18 16:36:29 +02:00
Nikita Popov
ee41204915 Merge branch 'PHP-7.4' 2019-09-18 10:45:19 +02:00
Nikita Popov
db7702213c Merge branch 'PHP-7.3' into PHP-7.4 2019-09-18 10:45:07 +02:00
Nikita Popov
e11ed02870 Fixed bug #78272
Use MAP_JIT only when running under hardened runtime, because MAP_JIT
is incompatible with fork().

The check is based on
f879e35e3e.
2019-09-18 10:41:27 +02:00
Nikita Popov
03efeda538 Backport MAP_JIT fixes from PCRE2 10.33
This is intended to fix the primary issue from bug #77260.

Prior to macOS 10.14 multiple MAP_JIT segments were not permitted,
leading to mmap failures and corresponding "no more memory" errors
on macOS 10.13.
2019-09-18 09:28:54 +02:00
Stanislav Malyshev
5a77831a53 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test
2019-08-25 20:06:50 -07:00
Stanislav Malyshev
c810d3d6ad Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix test
2019-08-25 20:06:43 -07:00
Stanislav Malyshev
d1646e328a Fix test
Not sure why offset changed... probably different PCRE version calculates
them in different way.
2019-08-25 20:06:02 -07:00
Stanislav Malyshev
c176c666e3 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #75457: heap-use-after-free in php7.0.25
2019-08-25 19:21:13 -07:00
Stanislav Malyshev
9f269d0d27 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #75457: heap-use-after-free in php7.0.25
2019-08-25 19:21:08 -07:00
Stanislav Malyshev
5d25ebb0dd Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #75457: heap-use-after-free in php7.0.25
2019-08-25 19:21:04 -07:00
Stanislav Malyshev
4b4a656d9e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #75457: heap-use-after-free in php7.0.25
2019-08-25 19:20:59 -07:00
Christoph M. Becker
7bf1f9d561 Fix #75457: heap-use-after-free in php7.0.25
Backport <https://vcs.pcre.org/pcre?view=revision&revision=1638>.
2019-08-25 19:19:50 -07:00
Remi Collet
8a9e7c8858 Merge branch 'PHP-7.4'
* PHP-7.4:
  ensure proper settings for test
  Update NEWS for 7.4.0RC1
  Update NEWS for PHP 7.4.0beta4
2019-08-20 16:31:24 +02:00
Remi Collet
15dcc1817d Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  ensure proper settings for test
2019-08-20 16:31:11 +02:00
Remi Collet
08aafbe93e ensure proper settings for test 2019-08-20 16:30:52 +02:00
Nikita Popov
8c927442b4 Merge branch 'PHP-7.4' 2019-08-13 14:54:57 +02:00
Nikita Popov
201729840c Mark PCRE locale key as local persistent 2019-08-13 14:49:59 +02:00
Nikita Popov
228bae7d74 Use TypeError for preg_replace type check
This is a type violation warning, and as such should use TypeError
in PHP 8.
2019-08-11 14:28:10 +02:00
Stephen Reay
66b750d07e Add stubs for PCRE extension
Closes GH-4501.
2019-08-11 12:46:42 +02:00
Christoph M. Becker
7f210dd1b9 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove upgrade-pcre.php script
2019-08-01 10:50:40 +02:00
Christoph M. Becker
61e1147146 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Remove upgrade-pcre.php script
2019-08-01 10:50:08 +02:00
Christoph M. Becker
b419b24ead Remove upgrade-pcre.php script
This script has not been updated for PCRE2, and it's mostly useless
anyway.  Therefore we remove it altogether.
2019-08-01 10:49:05 +02:00
Stanislav Malyshev
4798570607 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78338: Array cross-border reading in PCRE
2019-07-29 14:51:35 -07:00