]> granicus.if.org Git - php/log
php
5 years agoFix build
Nikita Popov [Mon, 9 Dec 2019 15:06:26 +0000 (16:06 +0100)]
Fix build

5 years agoExport zend_init_func_run_time_cache()
Dmitry Stogov [Mon, 9 Dec 2019 12:58:00 +0000 (15:58 +0300)]
Export zend_init_func_run_time_cache()

5 years agoCall zend_unregister_ini_entries() when unload extension loaded through dl() without...
Dmitry Stogov [Mon, 9 Dec 2019 12:05:24 +0000 (15:05 +0300)]
Call zend_unregister_ini_entries() when unload extension loaded through dl() without MSHUTDOWN callback.
Extensions with MSHUTDOWN should use UNREGISTER_INI_ENTRIES().

5 years agoFixed bug #78895 (Reflection detects abstract non-static class as abstract static...
Dmitry Stogov [Mon, 9 Dec 2019 10:49:12 +0000 (13:49 +0300)]
Fixed bug #78895 (Reflection detects abstract non-static class as abstract static. IS_IMPLICIT_ABSTRACT is not longer used)

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 9 Dec 2019 09:32:03 +0000 (10:32 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Extend CURLFile to support streams
  Use curl_mime_*() functions if available

5 years agoExtend CURLFile to support streams
Christoph M. Becker [Mon, 29 Apr 2019 08:21:07 +0000 (10:21 +0200)]
Extend CURLFile to support streams

Due to former restrictions of the libcurl API, curl multipart/formdata
file uploads supported only proper files.  However, as of curl 7.56.0
the new `curl_mime_*()` API is available (and already supported by
PHP[1]), which allows us to support arbitrary *seekable* streams, which
is generally desirable, and particularly resolves issues with the
transparent Unicode and long part support on Windows (see bug #77711).

Note that older curl versions are still supported, but CURLFile is
still restricted to proper files in this case.

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

(cherry picked from commit c68dc6b5e37e74d89e0a387079139c054c8faa81)

5 years agoUse curl_mime_*() functions if available
Christoph M. Becker [Mon, 15 Apr 2019 16:24:59 +0000 (18:24 +0200)]
Use curl_mime_*() functions if available

As of curl 7.56.0, `curl_formadd()` is deprecated in favor of
`curl_mime_*()`, so we use the latter if available.

(cherry picked from commit a83b68ba56714bfa06737a61af795460caa4a105)

5 years agoFixed bug #78926: Handle class table reallocation on failed link
Nikita Popov [Mon, 9 Dec 2019 08:15:27 +0000 (09:15 +0100)]
Fixed bug #78926: Handle class table reallocation on failed link

When we change back the bucket key on a class linking failure,
make sure to reload the bucket pointer, as the class table may
have been reallocated in the meantime.

Also remove a bogus bucket key change in anon class registration:
We don't actually rename the class in this case anymore, the RTD
key is already the final name.

5 years agoFix bug #78887: Add upgrading note about get_declared_classes() order
Nikita Popov [Mon, 9 Dec 2019 07:58:11 +0000 (08:58 +0100)]
Fix bug #78887: Add upgrading note about get_declared_classes() order

[ci skip]

5 years agoUse unmangled named in property type inheritance error
Nikita Popov [Mon, 9 Dec 2019 07:48:33 +0000 (08:48 +0100)]
Use unmangled named in property type inheritance error

5 years agoFixed bug #78904: Don't call any magic for uninitialized typed properties
Nikita Popov [Mon, 28 Oct 2019 12:34:33 +0000 (13:34 +0100)]
Fixed bug #78904: Don't call any magic for uninitialized typed properties

We already changed the behavior for __set() in f1848a4. However, it
seems that this is also a problem for all the other property magic,
see bug #78904.

This commit makes the behavior of all the property magic consistent:
Magic will not be triggered for uninitialized typed properties, only
explicitly unset() ones. This brings behavior more in line how
non-typed properties behave and avoids WTF.

Closes GH-4974.

5 years agoFix bug #78916 (php-fpm 7.4.0 don't send mail via mail())
Jakub Zelenka [Sun, 8 Dec 2019 17:57:17 +0000 (17:57 +0000)]
Fix bug #78916 (php-fpm 7.4.0 don't send mail via mail())

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Sat, 7 Dec 2019 11:07:51 +0000 (12:07 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78923: Artifacts when convoluting image with transparency

5 years agoFix #78923: Artifacts when convoluting image with transparency
willson-chen [Sat, 7 Dec 2019 02:56:37 +0000 (10:56 +0800)]
Fix #78923: Artifacts when convoluting image with transparency

We have to properly initialize `pxl` before using it.

Fix ported from <https://github.com/libgd/libgd/pull/559>.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 6 Dec 2019 10:10:31 +0000 (11:10 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix constant evaluation of && and ||

5 years agoFix constant evaluation of && and ||
Nikita Popov [Fri, 6 Dec 2019 10:07:57 +0000 (11:07 +0100)]
Fix constant evaluation of && and ||

The "return" in the for loop should have been a break on the switch,
otherwise the result is just ignored... but because it prevents
evaluation of the other operand, it also violates the invariant that
everything has been constant evaluated, resulting in an assertion
failure.

The for loop isn't correct in any case though, because it's not legal
to determine the result based on just the second operand, as the
first one may have a side-effect that cannot be optimized away.

5 years agoFix intermittent error in pdo_mysql___construct_options.phpt
Nikita Popov [Fri, 6 Dec 2019 06:38:56 +0000 (07:38 +0100)]
Fix intermittent error in pdo_mysql___construct_options.phpt

For the love of god, don't write tests based on mt_rand!

5 years agoFix timeout tests
Nikita Popov [Thu, 5 Dec 2019 08:13:57 +0000 (09:13 +0100)]
Fix timeout tests

After taking a more detailed look at our commonly failing timeout
tests... turns out that most of them are useless as written and
don't test what they're supposed to.

This PR has a couple of changes:

* Tests for timeout in while/for/foreach should just have the loop
as an infinite loop. Calling into something like busy_wait means
that we just end up always testing whatever busy_wait does.
* Tests for timeouts in calls need to be based on something like
sleep, otherwise we'd have to introduce a loop, and we'd end up
testing timeout of the looping structure instead. Using sleep only
works on Windows, because that's the only system where sleep counts
towards the timeout. As such, many of those tests are now Windows only.
* Removed some tests where I don't see a good way to test what they're
supposed to test. E.g. how can we test a timeout in eval() specifically?

The shutdown function tests are marked as XFAIL, as we are currently
missing a timeout check in call_user_function. I believe that's a
legitimate issue.

Closes GH-4969.

5 years agoFix mysqli ssl tests
Nikita Popov [Thu, 5 Dec 2019 07:37:52 +0000 (08:37 +0100)]
Fix mysqli ssl tests

First, make sure the tests are skipped if we connect via unix
socket, as we can't use SSL in that case.

Second, use a cipher that is not blacklisted in current MySQL
versions.

5 years agoFix bug #78823: add zlib library to mysqlnd
Arjen de Korte [Mon, 25 Nov 2019 22:54:49 +0000 (23:54 +0100)]
Fix bug #78823: add zlib library to mysqlnd

The problem is newer binutils will no longer default to --copy-dt-needed-entries but use --no-copy-dt-needed-entries instead. So all libraries needed *must* be provided.

Workarounds (either one works)
1) Add "-Wl,--copy-dt-needed-entries" to LDFLAGS to bring back the old behavior of the linker
2) Add "-lz" to list of libraries to be added

In "ext/mysqlnd/mysqlnd_protocol_frame_codec.c" when the "zlib.h" header is included should also trigger adding '-lz' to the list of libraries.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 4 Dec 2019 10:21:28 +0000 (11:21 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix AST printing of nullable builtin types

5 years agoFix AST printing of nullable builtin types
Nikita Popov [Wed, 4 Dec 2019 10:20:52 +0000 (11:20 +0100)]
Fix AST printing of nullable builtin types

Fixes oss-fuzz #19109.

5 years agoPreload: Better reason message for internal parents on windows
Nikita Popov [Wed, 4 Dec 2019 08:52:40 +0000 (09:52 +0100)]
Preload: Better reason message for internal parents on windows

Related to bug #78881.

5 years agoFixed bug #78898
Nikita Popov [Wed, 4 Dec 2019 08:40:48 +0000 (09:40 +0100)]
Fixed bug #78898

5 years agoAdd ReflectionMethod::getClosure() change to UPGRADING
Nikita Popov [Wed, 4 Dec 2019 07:07:59 +0000 (08:07 +0100)]
Add ReflectionMethod::getClosure() change to UPGRADING

Fixes bug #78897.

[ci skip]

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 4 Dec 2019 06:16:56 +0000 (07:16 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix print_r return types in opcache

5 years agoFix print_r return types in opcache
Tyson Andre [Sat, 30 Nov 2019 19:14:06 +0000 (14:14 -0500)]
Fix print_r return types in opcache

https://www.php.net/print_r

> When the return parameter is TRUE, this function will return a string.
> Otherwise, the return value is TRUE.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 3 Dec 2019 11:07:57 +0000 (12:07 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Next is 7.3.14

5 years agoNext is 7.3.14
Christoph M. Becker [Tue, 3 Dec 2019 11:04:17 +0000 (12:04 +0100)]
Next is 7.3.14

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Remi Collet [Tue, 3 Dec 2019 10:26:20 +0000 (11:26 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  next is 7.2.27

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Remi Collet [Tue, 3 Dec 2019 10:26:05 +0000 (11:26 +0100)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  next is 7.2.27

5 years agonext is 7.2.27
Remi Collet [Tue, 3 Dec 2019 10:25:37 +0000 (11:25 +0100)]
next is 7.2.27

5 years agoFix #78883: fgets(STDIN) fails on Windows
Christoph M. Becker [Mon, 2 Dec 2019 14:14:57 +0000 (15:14 +0100)]
Fix #78883: fgets(STDIN) fails on Windows

We add the `is_seekable` member to `php_stdio_stream_data`, and prefer
that over `is_pipe`, since the latter is simply a misnomer.  We keep
`is_pipe` for now for Windows only, though, because we need special
support for pipes there.  We also fix the misaligned bitfield which
formerly took 33 bit.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 2 Dec 2019 10:39:10 +0000 (11:39 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78814: strip_tags allows / in tag name => whitelist bypass

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Mon, 2 Dec 2019 10:38:11 +0000 (11:38 +0100)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #78814: strip_tags allows / in tag name => whitelist bypass

5 years agoFix #78814: strip_tags allows / in tag name => whitelist bypass
Christoph M. Becker [Sun, 17 Nov 2019 13:14:59 +0000 (14:14 +0100)]
Fix #78814: strip_tags allows / in tag name => whitelist bypass

When normalizing tags to check whether they are contained in the set
of allowable tags, we must not strip slashes, unless they come
immediately after the opening `<`, or immediately before the closing
`>`.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 2 Dec 2019 10:29:32 +0000 (11:29 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78296: is_file fails to detect file

5 years agoFix #78296: is_file fails to detect file
Christoph M. Becker [Mon, 25 Nov 2019 11:16:54 +0000 (12:16 +0100)]
Fix #78296: is_file fails to detect file

If we're constructing extended-length paths (i.e. paths prefixed with
`\\?\`), we have to replace all forward slashes with backward slashes,
because the former are not supported by Windows for extended-length
paths.

The more efficient and likely cleaner alternative solution would be to
cater to this in `php_win32_ioutil_normalize_path_w()` by always
replacing forward slashes, but that might break existing code.  It
might be sensible to change that for `master`, though.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 2 Dec 2019 10:20:53 +0000 (11:20 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78833: Integer overflow in pack causes out-of-bound access

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Mon, 2 Dec 2019 10:18:58 +0000 (11:18 +0100)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #78833: Integer overflow in pack causes out-of-bound access

5 years agoFix #78833: Integer overflow in pack causes out-of-bound access
Christoph M. Becker [Tue, 19 Nov 2019 13:22:26 +0000 (14:22 +0100)]
Fix #78833: Integer overflow in pack causes out-of-bound access

We check for potential signed integer overflow, and bail out
gracefully, in that case.

5 years agoFix bug #78889 (php-fpm service fails to start)
Jakub Zelenka [Sun, 1 Dec 2019 17:13:20 +0000 (17:13 +0000)]
Fix bug #78889 (php-fpm service fails to start)

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Sat, 30 Nov 2019 13:01:25 +0000 (14:01 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Upgrade to Oniguruma 6.9.4

5 years agoUpgrade to Oniguruma 6.9.4
Christoph M. Becker [Sat, 30 Nov 2019 08:38:46 +0000 (09:38 +0100)]
Upgrade to Oniguruma 6.9.4

Oniguruma 6.9.4 fixes several CVEs.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 29 Nov 2019 22:51:12 +0000 (23:51 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Add missing skip checks

5 years agoAdd missing skip checks
Christoph M. Becker [Fri, 29 Nov 2019 22:50:05 +0000 (23:50 +0100)]
Add missing skip checks

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 29 Nov 2019 22:41:39 +0000 (23:41 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Partially revert "Adapt test cases for Oniguruma 6.9.4"

5 years agoPartially revert "Adapt test cases for Oniguruma 6.9.4"
Christoph M. Becker [Fri, 29 Nov 2019 22:28:28 +0000 (23:28 +0100)]
Partially revert "Adapt test cases for Oniguruma 6.9.4"

This partially reverts commit c55d09c2f547634b577aa5aeaa1438d772bc29d1,
because `MB_ONIGURUMA_VERSION` is only available as of PHP 7.4.0, so
that change made no sense for PHP-7.3; we keep it for PHP-7.4, though.
We also stick with the modification to bug78633.phpt.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 29 Nov 2019 16:00:11 +0000 (17:00 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Adapt test cases for Oniguruma 6.9.4

5 years agoAdapt test cases for Oniguruma 6.9.4
Christoph M. Becker [Fri, 29 Nov 2019 15:47:10 +0000 (16:47 +0100)]
Adapt test cases for Oniguruma 6.9.4

Apparently, bug 78633 has now really been fixed; the former fix only
catered to the buffer overflow, but yielded a wrong result.  Also,
the order of the named captures has been fixed.

5 years agoPrevent parallel test conflicts
Christoph M. Becker [Wed, 27 Nov 2019 13:02:44 +0000 (14:02 +0100)]
Prevent parallel test conflicts

The better solution would be to actually use different directory names,
but adding respective CONFLICTS sections solves the issue for now.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Wed, 27 Nov 2019 08:33:36 +0000 (09:33 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78840: imploding $GLOBALS crashes

5 years agoFix #78840: imploding $GLOBALS crashes
Christoph M. Becker [Tue, 26 Nov 2019 09:19:27 +0000 (10:19 +0100)]
Fix #78840: imploding $GLOBALS crashes

We add support for IS_INDIRECT zvals to implode().

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 25 Nov 2019 14:57:13 +0000 (15:57 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #77638: var_export'ing certain class instances segfaults

5 years agoFix #77638: var_export'ing certain class instances segfaults
Christoph M. Becker [Mon, 25 Nov 2019 14:44:15 +0000 (15:44 +0100)]
Fix #77638: var_export'ing certain class instances segfaults

If objects return immutable property hash tables (typically,
`zend_empty_array`), we must not try to apply recursion protection on
those.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Dmitry Stogov [Mon, 25 Nov 2019 11:09:18 +0000 (14:09 +0300)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #78868 (Calling __autoload() with incorrect EG(fake_scope) value)

5 years agoFixed bug #78868 (Calling __autoload() with incorrect EG(fake_scope) value)
Dmitry Stogov [Mon, 25 Nov 2019 11:05:43 +0000 (14:05 +0300)]
Fixed bug #78868 (Calling __autoload() with incorrect EG(fake_scope) value)

5 years agoConsolidate NEWS for 7.4.0 release
Derick Rethans [Sun, 24 Nov 2019 09:23:33 +0000 (10:23 +0100)]
Consolidate NEWS for 7.4.0 release

5 years agoWIP: Merge NEWS
Derick Rethans [Sat, 23 Nov 2019 19:00:51 +0000 (20:00 +0100)]
WIP: Merge NEWS

5 years agoHandle reallocated root buffer during GC destroy phase (v2)
Tyson Andre [Wed, 20 Nov 2019 00:12:56 +0000 (19:12 -0500)]
Handle reallocated root buffer during GC destroy phase (v2)

We no longer protect GC during the destroy phase, so we need to
deal with buffer reallocation.

Note that the implementation of spl_SplObjectStorage_free_storage
will call the destructor of SplObjectStorage, and free the instance properties,
which I think is what caused the root buffer to be reallocated.
(`current` is a pointer for an index within the root buffer?)

This fixes bug #78811 for me.

Closes GH-4935

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 22 Nov 2019 18:28:49 +0000 (19:28 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78853: preg_match() may return integer > 1

5 years agoFix #78853: preg_match() may return integer > 1
Christoph M. Becker [Fri, 22 Nov 2019 18:21:43 +0000 (19:21 +0100)]
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>

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
George Wang [Thu, 21 Nov 2019 22:58:44 +0000 (17:58 -0500)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
George Wang [Thu, 21 Nov 2019 22:58:16 +0000 (17:58 -0500)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoAdded environment LSAPI_CLEAN_SHUTDOWN to control clean shutdown. Update SAPI version...
George Wang [Thu, 21 Nov 2019 22:57:50 +0000 (17:57 -0500)]
Added environment LSAPI_CLEAN_SHUTDOWN to control clean shutdown. Update SAPI version to LiteSpeed v7.6 .

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 21 Nov 2019 09:02:12 +0000 (10:02 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78849: GD build broken with -D SIGNED_COMPARE_SLOW

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Thu, 21 Nov 2019 09:00:31 +0000 (10:00 +0100)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #78849: GD build broken with -D SIGNED_COMPARE_SLOW

5 years agoFix #78849: GD build broken with -D SIGNED_COMPARE_SLOW
Christoph M. Becker [Thu, 21 Nov 2019 08:49:29 +0000 (09:49 +0100)]
Fix #78849: GD build broken with -D SIGNED_COMPARE_SLOW

Apparently, this has not been tested for a long time, and might be a
refactoring relict.  Anyhow, we have to pass the context to
`GIFNextPixel` as well.

5 years agoMake the UPGRADING note about ArrayObject more explicit.
Adam Harvey [Wed, 20 Nov 2019 23:33:04 +0000 (15:33 -0800)]
Make the UPGRADING note about ArrayObject more explicit.

We noticed the BC break when testing `curl_setopt()`, and hadn't interpreted
this note as affecting internal functions in general, so this adds a sub-bullet
to note that.

This overlaps a bit with the previous bullet, but since I don't know exactly
which operations were in mind at the time, I've elected to preserve them both.
Bits are cheap.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 18 Nov 2019 11:48:31 +0000 (12:48 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Update NEWS

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Mon, 18 Nov 2019 11:47:29 +0000 (12:47 +0100)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Update NEWS

5 years agoUpdate NEWS
Christoph M. Becker [Mon, 18 Nov 2019 11:36:01 +0000 (12:36 +0100)]
Update NEWS

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Dmitry Stogov [Mon, 18 Nov 2019 08:27:43 +0000 (11:27 +0300)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix $x = (bool)$x; for undefined with opcache

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Dmitry Stogov [Mon, 18 Nov 2019 08:26:30 +0000 (11:26 +0300)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix $x = (bool)$x; for undefined with opcache

5 years agoFix $x = (bool)$x; for undefined with opcache
Tyson Andre [Fri, 15 Nov 2019 17:47:32 +0000 (12:47 -0500)]
Fix $x = (bool)$x; for undefined with opcache

And `$x = !$x`

Noticed while working on GH-4912

The included test would not emit undefined variable errors in php 8.0
with opcache enabled. The command used:

```
php -d zend_extension=opcache.so --no-php-ini -d error_reporting=E_ALL \
    -d opcache.file_cache= -d opcache.enable_cli=1  test.php
```

5 years agoAdd NEWS entry for bug #76601 fix
Jakub Zelenka [Sun, 17 Nov 2019 14:52:36 +0000 (14:52 +0000)]
Add NEWS entry for bug #76601 fix

5 years agoDo not let PHP-FPM children miss SIGTERM, SIGQUIT
Maksim Nikulin [Mon, 21 Oct 2019 07:23:29 +0000 (14:23 +0700)]
Do not let PHP-FPM children miss SIGTERM, SIGQUIT

Postpone signal delivery while spawning children.
Prevent the following case:

- Reload (reexec) is in progress.
- New master is forking to start enough children for pools
  where `pm` is not `on-demand`.
- Another `SIGUSR2` is received by the master process.
- Master process switches to reloading state.
- Some child has not set its own signal handlers.
- `SIGQUIT` and `SIGTERM` sent by master process are caught
  by signal handler set by master process and so they are ignored.
- A child is running, it has no reason to finish

Before pull request #4465 this scenario could cause deadlock,
however with 0ed6c37140 reload finishes after `SIGKILL`.

Use sigprocmask() around fork() to avoid race of delivery signal to children
and setting of own signal handlers.

Fixes bug #76601

5 years agoHandle reallocated root buffer during GC destroy phase
Nikita Popov [Fri, 15 Nov 2019 14:53:49 +0000 (15:53 +0100)]
Handle reallocated root buffer during GC destroy phase

We no longer protect GC during the destroy phase, so we need to
deal with buffer reallocation.

Possible fix for bug #78811.

5 years agoZend Engine version is no longer in -dev
Derick Rethans [Fri, 15 Nov 2019 14:27:20 +0000 (14:27 +0000)]
Zend Engine version is no longer in -dev

5 years agoPHP-7.4 is now 7.4.1-dev
Derick Rethans [Fri, 15 Nov 2019 14:22:14 +0000 (14:22 +0000)]
PHP-7.4 is now 7.4.1-dev

5 years agoFixed bug #78810
Nikita Popov [Fri, 15 Nov 2019 11:06:17 +0000 (12:06 +0100)]
Fixed bug #78810

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 15 Nov 2019 08:47:34 +0000 (09:47 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix ASLR related invalid opline handler issues

5 years agoFix ASLR related invalid opline handler issues
Christoph M. Becker [Tue, 12 Nov 2019 15:12:59 +0000 (16:12 +0100)]
Fix ASLR related invalid opline handler issues

Opcache stores `opline->handler`s in shared memory.  These pointers are
invalid, if the main PHP DLL is loaded at another base address due to
ASLR.  We therefore store the address of `execute_ex` in the mmap base
file, and check on startup whether it matches its current address.  If
not, we fall back on the file cache if enabled, and bail out otherwise.

This still does not address cases where the opline handler is located
inside of another DLL (e.g. for some profilers, debuggers), but there
seems to be no general solution for now.

(cherry picked from commit 8ba10b8fbc020dc225d3b19d8f088f1351a3e304)

5 years agoAdd more CONFLICTS tags
Fabien Villepinte [Wed, 13 Nov 2019 19:59:23 +0000 (20:59 +0100)]
Add more CONFLICTS tags

Closes GH-4908.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Dmitry Stogov [Tue, 12 Nov 2019 10:00:27 +0000 (13:00 +0300)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed wrong constant usage

5 years agoFixed wrong constant usage
Dmitry Stogov [Tue, 12 Nov 2019 09:59:50 +0000 (12:59 +0300)]
Fixed wrong constant usage

5 years agows
Dmitry Stogov [Tue, 12 Nov 2019 07:51:55 +0000 (10:51 +0300)]
ws

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Stanislav Malyshev [Tue, 12 Nov 2019 07:08:44 +0000 (23:08 -0800)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix bug #78804 - Segmentation fault in Locale::filterMatches

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Stanislav Malyshev [Tue, 12 Nov 2019 07:08:38 +0000 (23:08 -0800)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix bug #78804 - Segmentation fault in Locale::filterMatches

5 years agoFix bug #78804 - Segmentation fault in Locale::filterMatches
Stanislav Malyshev [Tue, 12 Nov 2019 06:30:08 +0000 (22:30 -0800)]
Fix bug #78804 - Segmentation fault in Locale::filterMatches

5 years agoFix test case for Windows
Christoph M. Becker [Mon, 11 Nov 2019 11:48:17 +0000 (12:48 +0100)]
Fix test case for Windows

5 years agoFix test cases which fail on Windows debug builds
Christoph M. Becker [Mon, 11 Nov 2019 11:14:05 +0000 (12:14 +0100)]
Fix test cases which fail on Windows debug builds

We use the portable {TMP} instead of the hard-coded /tmp, and skip
mysqli_debug_append.phpt on Windows, because unlinking the trace file
while the connection is still open won't work there.

5 years agoFixed bug #78714 (funcs returning pointer can't use call convention spec)
Dmitry Stogov [Mon, 11 Nov 2019 09:07:48 +0000 (12:07 +0300)]
Fixed bug #78714 (funcs returning pointer can't use call convention spec)

5 years agoFix conflicts in windows ACL tests
Fabien Villepinte [Sat, 9 Nov 2019 12:55:42 +0000 (13:55 +0100)]
Fix conflicts in windows ACL tests

Closes GH-4898.

5 years agoMake test runner runnable without arguments
Fabien Villepinte [Fri, 8 Nov 2019 19:33:19 +0000 (20:33 +0100)]
Make test runner runnable without arguments

The default PHP executable was not set when no args were provided.

Closes GH-4894.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Levi Morrison [Fri, 8 Nov 2019 15:02:49 +0000 (08:02 -0700)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoWrap php_random.h in C++ portability macros
Levi Morrison [Thu, 7 Nov 2019 21:51:21 +0000 (14:51 -0700)]
Wrap php_random.h in C++ portability macros

Also remove portability headers. This goes against the existing
conventions of these files.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 7 Nov 2019 13:42:11 +0000 (14:42 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Wrap hrtime in `extern "c" {}`

5 years agoWrap hrtime in `extern "c" {}`
Levi Morrison [Wed, 6 Nov 2019 17:30:09 +0000 (10:30 -0700)]
Wrap hrtime in `extern "c" {}`

This allows it to be used by C++ extensions without them having to do their own forward declares.

Closes GH-4890.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 7 Nov 2019 13:31:55 +0000 (14:31 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix php_pcre_mutex_free()