]> granicus.if.org Git - php/log
php
5 years agoUpdate NEWS for 7.4.0RC5
Derick Rethans [Tue, 15 Oct 2019 11:29:33 +0000 (11:29 +0000)]
Update NEWS for 7.4.0RC5

5 years agoUpdate NEWS for PHP 7.4.0RC4
Derick Rethans [Tue, 15 Oct 2019 11:28:15 +0000 (11:28 +0000)]
Update NEWS for PHP 7.4.0RC4

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Joe Watkins [Mon, 14 Oct 2019 14:50:06 +0000 (16:50 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix checksum calculation for opcache

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Joe Watkins [Mon, 14 Oct 2019 14:48:48 +0000 (16:48 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix checksum calculation for opcache

5 years agoFix checksum calculation for opcache
Mitch Hagstrand [Wed, 9 Oct 2019 08:38:11 +0000 (03:38 -0500)]
Fix checksum calculation for opcache

5 years agoFix handling of overflowing invalid octal in tokenizer
Nikita Popov [Sat, 12 Oct 2019 19:27:44 +0000 (21:27 +0200)]
Fix handling of overflowing invalid octal in tokenizer

If token_get_all() is used, we still need to correctly distinguish
LNUMBER vs DNUMBER here for backwards compatibility.

5 years agoAdd "-pthread" to EXTRA_LDFLAGS_PROGRAM as well
Nikita Popov [Mon, 14 Oct 2019 09:32:47 +0000 (11:32 +0200)]
Add "-pthread" to EXTRA_LDFLAGS_PROGRAM as well

5 years agoFix test case
Christoph M. Becker [Sat, 12 Oct 2019 14:27:24 +0000 (16:27 +0200)]
Fix test case

`MSG_EOR` and `MSG_EOF` are not necessarily defined, in which case the
test would fail.

5 years agoFix potential heap corruption
Christoph M. Becker [Sat, 12 Oct 2019 14:14:27 +0000 (16:14 +0200)]
Fix potential heap corruption

`tmp` is allocated by `malloc()`, so we must not `LocalFree()` it.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Sat, 12 Oct 2019 12:45:40 +0000 (14:45 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78665: Multicasting may leak memory

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Sat, 12 Oct 2019 12:44:35 +0000 (14:44 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #78665: Multicasting may leak memory

5 years agoFix #78665: Multicasting may leak memory
Christoph M. Becker [Sat, 12 Oct 2019 11:49:39 +0000 (13:49 +0200)]
Fix #78665: Multicasting may leak memory

5 years agoAzure: Publish code coverage results
Gerard Roche [Wed, 25 Sep 2019 18:13:17 +0000 (19:13 +0100)]
Azure: Publish code coverage results

* Add an Azure Publish Code Coverage Results task
* Add `make gcovr-html` to generate a gcovr test coverage report in HTML
* Add `make gcovr-xml` to generate a gcovr test coverage report in XML
* Remove `test` target dependency from `make lcov-html`;
  Run the two targets together instead: `make test lcov-html`.

Re: https://github.com/php/php-src/pull/4739#issuecomment-534911441

See: https://externals.io/message/107113,
https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-code-coverage-results?view=azure-devops,
and https://github.com/php/php-src/pull/4759.

5 years agoAdd upgrading note for round(-0.0) change
Nikita Popov [Fri, 11 Oct 2019 15:09:06 +0000 (17:09 +0200)]
Add upgrading note for round(-0.0) change

As cmb pointed out, the new behavior is compliant with POSIX:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/round.html.

5 years agoRemove configure checks for ltp when using --enable-gcov
Nikita Popov [Fri, 11 Oct 2019 14:44:31 +0000 (16:44 +0200)]
Remove configure checks for ltp when using --enable-gcov

gcov builds can also be used with other tools like gcovr, so remove
the hard dependency on LTP.

5 years agoNEWS
Remi Collet [Fri, 11 Oct 2019 11:38:15 +0000 (13:38 +0200)]
NEWS

5 years agoFix #78662: stream_write bad error detection
Remi Collet [Fri, 11 Oct 2019 11:36:16 +0000 (13:36 +0200)]
Fix #78662: stream_write bad error detection

5 years agoReplace port already used
Fabien Villepinte [Thu, 10 Oct 2019 17:47:20 +0000 (19:47 +0200)]
Replace port already used

Closes GH-4811.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 10 Oct 2019 14:14:52 +0000 (16:14 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Thu, 10 Oct 2019 14:14:37 +0000 (16:14 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoFix leak in phar open
Nikita Popov [Thu, 10 Oct 2019 14:14:04 +0000 (16:14 +0200)]
Fix leak in phar open

5 years agoRevert "Fixed CLI/CGI/FPM build, when they are built together with Apache SAPI"
Dmitry Stogov [Thu, 10 Oct 2019 13:24:15 +0000 (16:24 +0300)]
Revert "Fixed CLI/CGI/FPM build, when they are built together with Apache SAPI"

This reverts commit db094b4b2e5ef0f0c30f412ce3a2516e31e17da7.

5 years agoRevert "Don't buid static libaraies when only DSO required"
Dmitry Stogov [Thu, 10 Oct 2019 13:24:12 +0000 (16:24 +0300)]
Revert "Don't buid static libaraies when only DSO required"

This reverts commit f633c347574c0d814050b4bf2493e0cac6a5988c.

5 years agoRevert "Link executable files using non PIC object files. This reduces PIC overhead...
Dmitry Stogov [Thu, 10 Oct 2019 13:23:59 +0000 (16:23 +0300)]
Revert "Link executable files using non PIC object files. This reduces PIC overhead and improves performance."

This reverts commit eef85229d0fe9f69d325aa0231e592f35c468afb.

5 years agoReturn error_zval form get_property_ptr_ptr on exception
Nikita Popov [Thu, 10 Oct 2019 13:14:04 +0000 (15:14 +0200)]
Return error_zval form get_property_ptr_ptr on exception

This goes in the reverse direction of 4463acb9513dfb62206760c49b3da1fe4d92f40a.
After looking around a bit, it seems that we already check for
Z_ISERROR_P() on the get_property_ptr_ptr return value in other places.
So do this in zend_fetch_property_address() as well, and also make
sure that EG(error_zval) is indeed returned on exception in
get_property_ptr_ptr.

In particular, this fixes the duplicate exceptions that we used to
get because first get_property_ptr_ptr threw one and then
read_property throws the same exception again.

5 years agoExplicitly check for exceptions in by-ref obj prop assign
Nikita Popov [Thu, 10 Oct 2019 12:41:35 +0000 (14:41 +0200)]
Explicitly check for exceptions in by-ref obj prop assign

Relying on setting ERROR if an exception happened during the
property address fetch is both a bit fragile and may pessimize
other codepaths that will check for exceptions in the VM. Adding
an extra exception check instead, which should also allow us to
drop the use of ERROR in this area in master.

5 years agoFix leak when property AST evaluation fails
Nikita Popov [Thu, 10 Oct 2019 10:44:55 +0000 (12:44 +0200)]
Fix leak when property AST evaluation fails

5 years agoAlso check for exception after stream_eof
Nikita Popov [Thu, 10 Oct 2019 10:07:47 +0000 (12:07 +0200)]
Also check for exception after stream_eof

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 10 Oct 2019 09:41:51 +0000 (11:41 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Thu, 10 Oct 2019 09:41:29 +0000 (11:41 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoFix leak on static method call on non-existent class
Nikita Popov [Thu, 10 Oct 2019 09:40:49 +0000 (11:40 +0200)]
Fix leak on static method call on non-existent class

5 years agoReport error if stream_read is not implemented
Nikita Popov [Thu, 10 Oct 2019 09:12:17 +0000 (11:12 +0200)]
Report error if stream_read is not implemented

We need to return -1 in this case. Slightly restructure the code
to avoid unnecessary conditions.

5 years agoFix leak on "Cannot assign by reference to overloaded object" error
Nikita Popov [Thu, 10 Oct 2019 08:07:54 +0000 (10:07 +0200)]
Fix leak on "Cannot assign by reference to overloaded object" error

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 9 Oct 2019 15:33:52 +0000 (17:33 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Wed, 9 Oct 2019 15:33:44 +0000 (17:33 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoAvoid float to int cast UB in exif
Nikita Popov [Wed, 9 Oct 2019 15:33:01 +0000 (17:33 +0200)]
Avoid float to int cast UB in exif

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Wed, 9 Oct 2019 15:29:34 +0000 (17:29 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78656: Parse errors classified as highest log-level

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Wed, 9 Oct 2019 15:28:33 +0000 (17:28 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #78656: Parse errors classified as highest log-level

5 years agoFix #78656: Parse errors classified as highest log-level
Erik Lundin [Wed, 9 Oct 2019 12:08:22 +0000 (14:08 +0200)]
Fix #78656: Parse errors classified as highest log-level

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 9 Oct 2019 15:00:47 +0000 (17:00 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoFixed bug #78658
Nikita Popov [Wed, 9 Oct 2019 14:59:38 +0000 (16:59 +0200)]
Fixed bug #78658

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 9 Oct 2019 12:58:10 +0000 (14:58 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Wed, 9 Oct 2019 12:58:01 +0000 (14:58 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoRemove redundant components < 0 check
Nikita Popov [Wed, 9 Oct 2019 12:57:24 +0000 (14:57 +0200)]
Remove redundant components < 0 check

components is an unsigned number, it cannot be smaller than zero.

5 years agoFix #78650: new COM Crash
Christoph M. Becker [Wed, 9 Oct 2019 12:03:36 +0000 (14:03 +0200)]
Fix #78650: new COM Crash

As of PHP 7.4.0, the `get_property_ptr_ptr` handler is mandatory; we
implement it to always return `NULL`, which is equivalent to not
setting the handler in former versions.

We add a portable and faster test case than what has been presented in
the bug ticket.

5 years agoAvoid file clash in root_check skipifs
Fabien Villepinte [Sat, 5 Oct 2019 12:26:33 +0000 (14:26 +0200)]
Avoid file clash in root_check skipifs

Extract root check into skipif_root.inc to share this commonly
repeated logic.

Closes GH-4779.

5 years agoDon't check type of simple parameter default values
Nikita Popov [Tue, 8 Oct 2019 15:29:41 +0000 (17:29 +0200)]
Don't check type of simple parameter default values

After fixing the int->double coercion case, this is already verified
at compile-time, so there is no need to redo this type check on
every call.

Only perform the type check every time for the case of AST default
values.

5 years agoHandle "non well formed" exception during ZPP
Nikita Popov [Tue, 8 Oct 2019 14:53:23 +0000 (16:53 +0200)]
Handle "non well formed" exception during ZPP

Previously if the "non well formed" notice was converted into an
exception we'd still end up executing the function.

Also drop the now unnecessary EG(exception) checks in the engine.

Additionally remote a bogus exception in zend_is_callable: It
should only be writing to error, but not directly throwing.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Tue, 8 Oct 2019 14:14:06 +0000 (16:14 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Tue, 8 Oct 2019 14:13:17 +0000 (16:13 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoAdd pcre_get_compiled_regex_cache_ex() with local_aware flag
Sergei Turchanov [Tue, 8 Oct 2019 07:55:07 +0000 (17:55 +1000)]
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.

5 years agoFixed bug #78648
Nikita Popov [Tue, 8 Oct 2019 13:39:22 +0000 (15:39 +0200)]
Fixed bug #78648

5 years agoFixed bug #78644
Nikita Popov [Tue, 8 Oct 2019 12:30:53 +0000 (14:30 +0200)]
Fixed bug #78644

Make sure the initialize the result of FETCH_OBJ_UNSET operations.
I'm using a NULL value rather than ERROR here, because the latter
no longer exists in master.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 8 Oct 2019 12:12:50 +0000 (14:12 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Add missing SKIPIFs in exif tests

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Tue, 8 Oct 2019 12:12:12 +0000 (14:12 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Add missing SKIPIFs in exif tests

5 years agoAdd missing SKIPIFs in exif tests
Fabien Villepinte [Tue, 8 Oct 2019 11:50:03 +0000 (13:50 +0200)]
Add missing SKIPIFs in exif tests

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Tue, 8 Oct 2019 10:35:35 +0000 (12:35 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoCheck for exception after applying stream filters
Nikita Popov [Tue, 8 Oct 2019 10:18:59 +0000 (12:18 +0200)]
Check for exception after applying stream filters

This makes the stream opening actually fail, and avoids assertion
failures when we tokenize with EG(exception) set.

Also avoid throwing an additional warning after an exception has
already been thrown.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 8 Oct 2019 10:10:35 +0000 (12:10 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78642: Wrong libiconv version displayed

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Tue, 8 Oct 2019 10:09:46 +0000 (12:09 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #78642: Wrong libiconv version displayed

5 years agoFix #78642: Wrong libiconv version displayed
Christoph M. Becker [Tue, 8 Oct 2019 10:09:11 +0000 (12:09 +0200)]
Fix #78642: Wrong libiconv version displayed

The high byte of `_libiconv_version` specifies the major version; the
low byte the minor version.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 8 Oct 2019 10:05:21 +0000 (12:05 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  7.3.12 is next

5 years ago7.3.12 is next
Christoph M. Becker [Tue, 8 Oct 2019 10:04:25 +0000 (12:04 +0200)]
7.3.12 is next

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Remi Collet [Tue, 8 Oct 2019 09:36:57 +0000 (11:36 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  next is 7.2.25

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Remi Collet [Tue, 8 Oct 2019 09:36:36 +0000 (11:36 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  next is 7.2.25

5 years agonext is 7.2.25
Remi Collet [Tue, 8 Oct 2019 09:36:10 +0000 (11:36 +0200)]
next is 7.2.25

5 years agoadd librt for opcache
Remi Collet [Mon, 7 Oct 2019 14:31:09 +0000 (16:31 +0200)]
add librt for opcache

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 8 Oct 2019 07:49:24 +0000 (09:49 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78641: addGlob can modify given remove_path value

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Tue, 8 Oct 2019 07:45:42 +0000 (09:45 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #78641: addGlob can modify given remove_path value

5 years agoFix #78641: addGlob can modify given remove_path value
Christoph M. Becker [Tue, 8 Oct 2019 07:25:56 +0000 (09:25 +0200)]
Fix #78641: addGlob can modify given remove_path value

`remove_path` points to the given string, so we must not modify it.
Instead we use a duplicate, if we need the modification.

We may want to switch to `zend_string`s in master.

5 years agoFix grammar nits on php 7.4 UPGRADING
Tyson Andre [Mon, 7 Oct 2019 13:39:10 +0000 (09:39 -0400)]
Fix grammar nits on php 7.4 UPGRADING

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 7 Oct 2019 15:52:41 +0000 (17:52 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Mon, 7 Oct 2019 15:52:35 +0000 (17:52 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoCheck for object_init_ex() failure in user filter factory
Nikita Popov [Mon, 7 Oct 2019 15:40:59 +0000 (17:40 +0200)]
Check for object_init_ex() failure in user filter factory

5 years agoFix leak when include fails in a read operation
Nikita Popov [Mon, 7 Oct 2019 15:29:33 +0000 (17:29 +0200)]
Fix leak when include fails in a read operation

Usually it will already fail when opening, but reads can also
fail since PHP 7.4, in which case we still need to place the
file handle in open_files to make sure the destructor will run
on it.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 7 Oct 2019 14:44:39 +0000 (16:44 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Mon, 7 Oct 2019 14:44:31 +0000 (16:44 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoSet session.gc_probability=0 in bug78624.phpt
Nikita Popov [Mon, 7 Oct 2019 14:43:19 +0000 (16:43 +0200)]
Set session.gc_probability=0 in bug78624.phpt

We only want to test manually triggered session GC.
Avoid spurious output due to automatic GC.

5 years agoFix number of required arguments in arginfo
Nikita Popov [Mon, 7 Oct 2019 09:42:22 +0000 (11:42 +0200)]
Fix number of required arguments in arginfo

* pack() only requires one argument
* stream_context_set_option() only requires two arguments
* ReflectionMethod::getClosure() accepts no args for static methods
* DOMDocument::createProcessingInstruction() only requires one arg
* DOMImplementation::createDocument() only requires two arguments
* DOMDocument::importNode() only requires one arg
* mysql_get_client_version() doesn't accept any args,
  despite what the docs say...

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 7 Oct 2019 11:24:16 +0000 (13:24 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoBackport fix for uaf during pcre jit fallback
Nikita Popov [Mon, 7 Oct 2019 11:21:36 +0000 (13:21 +0200)]
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.

5 years agoBail out if JUNIT is not enabled
Christoph M. Becker [Mon, 7 Oct 2019 11:20:14 +0000 (13:20 +0200)]
Bail out if JUNIT is not enabled

Otherwise we would try to access an array element of `false`, which
issues a notice as of PHP 7.4.0.  This would happen, for instance, for
bug63447_001.phpt if CGI is not available.

5 years agoDon't test default serialize max_depth
Nikita Popov [Mon, 7 Oct 2019 10:40:21 +0000 (12:40 +0200)]
Don't test default serialize max_depth

The default depth is large enough to cause stack overflows in
msan builds, though apparently only on old clang versions. Avoiding
a stack overflow there requires making the depth *much* smaller,
less than 1000. As I don't think that's reasonable for all the other
setups where 4k works fine, I'm just dropping this part of the test.

5 years agoDelete temporary .post files of run-tests.php
Christoph M. Becker [Mon, 7 Oct 2019 10:13:02 +0000 (12:13 +0200)]
Delete temporary .post files of run-tests.php

Commit 5649267[1] changed run-tests.php to only delete .post files for
passing tests.  However, that code wouldn't be exercised at all, since
`run_test()` already returned, so we move the deletion upwards.

[1]
<http://git.php.net/?p=php-src.git;a=commit;h=5649267b257c78e46a934434c0bff894e0b5b694>

5 years agoLimit retry_limit test to oniguruma >= 6.9.3
Nikita Popov [Mon, 7 Oct 2019 08:49:34 +0000 (10:49 +0200)]
Limit retry_limit test to oniguruma >= 6.9.3

This test is somewhat fragile in that it depends on how well a
particular regex is optimized. Apparently on 6.9.1 this regex
would hit the default retry_limit of 1000000 already. I'm limiting
this to 6.9.3 because that's the version that works for me.

5 years agoFix typo in UPGRADING
Nikita Popov [Mon, 7 Oct 2019 07:51:13 +0000 (09:51 +0200)]
Fix typo in UPGRADING

[ci skip]

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 7 Oct 2019 07:18:29 +0000 (09:18 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78623: Regression caused by "SP call yields additional empty result set"

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Mon, 7 Oct 2019 07:17:03 +0000 (09:17 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #78623: Regression caused by "SP call yields additional empty result set"

5 years agoFix #78623: Regression caused by "SP call yields additional empty result set"
Christoph M. Becker [Mon, 7 Oct 2019 06:58:11 +0000 (08:58 +0200)]
Fix #78623: Regression caused by "SP call yields additional empty result set"

This reverts commit 41a4379cb45419a376043ca5f8c5a2bca82cea7c.

5 years agoAdd support for mbstring.regex_retry_limit
Nikita Popov [Wed, 2 Oct 2019 10:42:46 +0000 (12:42 +0200)]
Add support for mbstring.regex_retry_limit

This is very similar to the existing mbstring.regex_stack_limit,
but for backtracking. The default value matches pcre.backtrack_limit.
Only used on libonig >= 2.8.0.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 4 Oct 2019 20:46:53 +0000 (22:46 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMake sure T_ERROR is returned for all lexer exceptions
Nikita Popov [Fri, 4 Oct 2019 20:42:14 +0000 (22:42 +0200)]
Make sure T_ERROR is returned for all lexer exceptions

This originally manifested as a leak in oss-fuzz #18000. The following
is a reduced test case:

    <?php
    [
        5 => 1,
        "foo" > 1,
        "      " => "" == 0
    ];
    <<<BAR
    $x
     BAR;

Because this particular error condition did not return T_ERROR,
EG(exception) was set while performing binary operation constant
evaluation, which checks exceptions for cast failures.

Instead of adding this indirect test case, I'm adding an assertion
that the lexer has to return T_ERROR if EG(exception) is set.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 4 Oct 2019 14:04:34 +0000 (16:04 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoImprove diagnostic on PCRE JIT mmap failure
Nikita Popov [Fri, 4 Oct 2019 14:01:10 +0000 (16:01 +0200)]
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.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 4 Oct 2019 11:54:49 +0000 (13:54 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Split intl tests for ICU 65

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Fri, 4 Oct 2019 11:53:58 +0000 (13:53 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Split intl tests for ICU 65

5 years agoSplit intl tests for ICU 65
Christoph M. Becker [Fri, 4 Oct 2019 10:48:40 +0000 (12:48 +0200)]
Split intl tests for ICU 65

5 years agoFixed bug #78632
Nikita Popov [Fri, 4 Oct 2019 10:38:18 +0000 (12:38 +0200)]
Fixed bug #78632

I'm going for a very conservative fix here, where the previous
logic is restored for the case where an object is passed to
method_exists(). We might want to check against EG(scope) instead,
but this seems like a safer choice.

This means that behavior in PHP 7.4 changes only for
method_exists('C', 'privateMethodNotOnC'), which should be sensible.

5 years agoFix use-after-free with delayed interned memoized const operand
Nikita Popov [Fri, 4 Oct 2019 08:38:11 +0000 (10:38 +0200)]
Fix use-after-free with delayed interned memoized const operand

We should addref CONST operands during memoization, as they might
be destroyed by later compilation, e.g. through interning.

5 years agoFix crash when unpacking into array literal with string keys
Nikita Popov [Fri, 4 Oct 2019 08:11:30 +0000 (10:11 +0200)]
Fix crash when unpacking into array literal with string keys