]>
granicus.if.org Git - php/log
Nikita Popov [Tue, 11 Aug 2020 13:48:40 +0000 (15:48 +0200)]
Fixed bug #79927
We need to unset the AT_FIRST_YIELD flag when yielding from an
array as well.
In the interest of being conservative, I'm applying this only to
PHP 8.
Nikita Popov [Tue, 11 Aug 2020 13:22:14 +0000 (15:22 +0200)]
Fix nullsafe operator on $this
Nikita Popov [Tue, 11 Aug 2020 13:14:50 +0000 (15:14 +0200)]
SAVE_OPLINE in NULL_HANDLER
Let's avoid crashing before the nice error message gets printed...
Nikita Popov [Tue, 11 Aug 2020 13:11:36 +0000 (15:11 +0200)]
Fix nullsafe operator on reference
Dereference the value before checking the type. As the happy path
necessarily has to check for references, I'm not bothering to
delay the comparison.
Nikita Popov [Tue, 11 Aug 2020 12:59:04 +0000 (14:59 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fixed bug #79917
Nikita Popov [Tue, 11 Aug 2020 12:42:13 +0000 (14:42 +0200)]
Fixed bug #79917
op_arrays can be shared on two levels: Either the op_array is
completely shared, or it is distinct but shares all members
(apart from static_variables).
The the op_array is distinct, we need to make sure to properly
initialize the MAP_PTR structures.
Christoph M. Becker [Tue, 11 Aug 2020 08:17:43 +0000 (10:17 +0200)]
Autogenerate function entries for COMPersistHelper
Co-authored-by: Nikita Popov <nikita.ppv@googlemail.com>
Christoph M. Becker [Tue, 11 Aug 2020 09:37:52 +0000 (11:37 +0200)]
Remove practically unused parameter
The `cached` out parameter of `php_com_load_typelib_via_cache()` was
meant to signal whether a particular typelib actually has been cached.
This is not really relevant, though, for the imagined purposes, and
since the parameter is no longer really used, we removed it altohether.
Christoph M. Becker [Tue, 11 Aug 2020 09:28:41 +0000 (11:28 +0200)]
Merge branch 'PHP-7.4' into master
* PHP-7.4:
Fix #48585: com_load_typelib holds reference, fails on second call
Christoph M. Becker [Tue, 11 Aug 2020 09:27:50 +0000 (11:27 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #48585: com_load_typelib holds reference, fails on second call
Christoph M. Becker [Tue, 4 Aug 2020 16:25:50 +0000 (18:25 +0200)]
Fix #48585: com_load_typelib holds reference, fails on second call
Whether the type library is cached is actually irrelevant here; what
matters is that the symbols are imported, and since these are not
cached, we have to import them for every request. And we cannot cache
the symbols, because the import depends on the current codepage, but
the codepage is a `PHP_INI_ALL` setting.
Nikita Popov [Tue, 11 Aug 2020 08:35:59 +0000 (10:35 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fixed bug #79951
Nikita Popov [Tue, 11 Aug 2020 08:35:17 +0000 (10:35 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fixed bug #79951
Nikita Popov [Tue, 11 Aug 2020 08:33:59 +0000 (10:33 +0200)]
Fixed bug #79951
One branch did not release tmp_replace_entry_str.
Also reduce the scope of some variables.
Máté Kocsis [Tue, 11 Aug 2020 07:40:14 +0000 (09:40 +0200)]
Remove unnecessary function entry array
George Wang [Mon, 10 Aug 2020 23:11:48 +0000 (19:11 -0400)]
Merge branch 'PHP-7.4'
George Wang [Mon, 10 Aug 2020 23:11:26 +0000 (19:11 -0400)]
Merge branch 'PHP-7.3' into PHP-7.4
George Wang [Mon, 10 Aug 2020 23:11:03 +0000 (19:11 -0400)]
Make sure string is NUL byte terminated.
Christoph M. Becker [Mon, 10 Aug 2020 17:42:05 +0000 (19:42 +0200)]
Fix signature of callback function
Cf. <https://docs.microsoft.com/en-us/windows/win32/api/imagehlp/nc-imagehlp-pimagehlp_status_routine>.
Nikita Popov [Mon, 10 Aug 2020 19:53:26 +0000 (21:53 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Check the correct list
Nikita Popov [Mon, 10 Aug 2020 19:53:20 +0000 (21:53 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Check the correct list
Nikita Popov [Mon, 10 Aug 2020 19:52:36 +0000 (21:52 +0200)]
Check the correct list
This was supposed to check mx_list, not weight_list... oops.
Nikita Popov [Mon, 10 Aug 2020 18:43:24 +0000 (20:43 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix bug #79944
Nikita Popov [Mon, 10 Aug 2020 18:43:04 +0000 (20:43 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix bug #79944
Nikita Popov [Mon, 10 Aug 2020 14:53:31 +0000 (16:53 +0200)]
Fix bug #79944
Only return true from dns_get_mx if we actually found any MX record.
Nikita Popov [Mon, 10 Aug 2020 12:36:06 +0000 (14:36 +0200)]
Skip bug70417.phpt if lsof output looks wrong
On alpine lsof accepts -p but it doesn't actually do anything.
Add a crude check for whether lsof looks like Linux lsof.
Nikita Popov [Mon, 10 Aug 2020 12:20:37 +0000 (14:20 +0200)]
Check permissions in pcntl_unshare_03.phpt
Nikita Popov [Mon, 10 Aug 2020 12:19:04 +0000 (14:19 +0200)]
Don't check specific message in socket_shutdown.phpt
Nikita Popov [Wed, 5 Aug 2020 09:31:31 +0000 (11:31 +0200)]
Only test one error in socket_strerror() test
The messages differ by used libc and version, so let's not try to
do exhaustive testing here.
Nikita Popov [Mon, 10 Aug 2020 10:54:02 +0000 (12:54 +0200)]
Fixed bug #62294
The primary issue was already resolved in
7c3e487289ec41e560cf7a77e36eb43da2234f33 ,
but the particular example used in this bug report ran into an
additional issue on PHP 8, because I forgot to drop a number of
zend_bailout calls when switch require failure to throw.
Nikita Popov [Mon, 10 Aug 2020 10:39:19 +0000 (12:39 +0200)]
Fixed bug #65275
Make EG(exit_status) the single source of truth for the exit status,
instead of having two variables that we cannot really keep
synchronized.
Christoph M. Becker [Mon, 10 Aug 2020 10:27:33 +0000 (12:27 +0200)]
Merge branch 'PHP-7.4' into master
* PHP-7.4:
Fix #79922: Crash after multiple calls to xml_parser_free()
Christoph M. Becker [Mon, 10 Aug 2020 10:25:08 +0000 (12:25 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #79922: Crash after multiple calls to xml_parser_free()
Christoph M. Becker [Mon, 10 Aug 2020 08:40:31 +0000 (10:40 +0200)]
Fix #79922: Crash after multiple calls to xml_parser_free()
We must not call `zend_list_delete()` in resource closer functions
exposed to userland, because decreasing the refcount there leads to
use-after-free scenarios. In this case, commit
4a42fbb worked for
typical use-cases where `xml_parser_free()` has been called exactly
once for the resource, because there is an internal zval (`->index`)
referencing the same resource which already increased the refcount by
one. However, when `xml_parser_free()` is called multiple times on the
same XML parser resource, the resource would be freed prematurely.
Instead we forcefully close the resource in `xml_parser_free()`. We
also could decrease the refcount of the resource there, but that would
require to call `xml_parser_free()` which is somewhat uncommon, and
would be particularly bad wrt. PHP 8 where that function is a NOP, and
as such doesn't have to be called. So we do no longer increase the
refcount of the resource when copying it to the internal zval, and let
the usualy refcounting semantics take care of the resource destruction.
[1] <http://git.php.net/?p=php-src.git;a=commit;h=
4a42fbbbc73aad7427aef5c89974d1833636e082 >
Nikita Popov [Mon, 10 Aug 2020 10:09:38 +0000 (12:09 +0200)]
Remove some unnnecessary null checks in openssl
Remove null checks before EVP_PKEY_free and BIO_free. NULL is a
no-op for both of these. Probably applies to most other freeing
function as well...
Nikita Popov [Thu, 6 Aug 2020 11:18:29 +0000 (13:18 +0200)]
Improve X509_PKEY management in OpenSSL
Remove the free_pkey argument from php_openssl_pkey_from_zval,
instead return an EVP_PKEY that always needs to be freed
(by incrementing refcount if necessary).
This makes the code simpler and fixes a number of bugs in the
existing handling.
Closes GH-5946.
Nikita Popov [Mon, 10 Aug 2020 09:19:35 +0000 (11:19 +0200)]
Expand upgrading note for namespaced name change
Mention the case from bug #79942.
[ci skip]
Nikita Popov [Mon, 10 Aug 2020 08:28:13 +0000 (10:28 +0200)]
Fixed bug #79948
Make sure we don't execute further scripts if one of them encountered
an exit exception.
Also make sure that we free file handles that end up unused due to
an early abort in php_execute_scripts(), which turned up as an
issue in the added test case.
Finally, make use of EG(exit_status) in the places where we
zend_eval_string_ex, instead of unconditionally assigning exit
code 254. If an error occurs, the error handler will already set
exit status 255.
Nikita Popov [Mon, 10 Aug 2020 08:47:18 +0000 (10:47 +0200)]
Fixup phar test
Nikita Popov [Mon, 10 Aug 2020 08:38:33 +0000 (10:38 +0200)]
Fixed bug #77561
Unconditionally strip shebang lines when using the CLI SAPI,
independently of whether they occur in the primary or non-primary
script. It's unlikely that someone intentionally wants to print
that shebang line when including a script, and this regularly
causes issues when scripts are used in multiple contexts, e.g.
for direct invocation and as a phar bootstrap.
Nikita Popov [Mon, 10 Aug 2020 08:12:49 +0000 (10:12 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fixed bug #79947
Nikita Popov [Mon, 10 Aug 2020 08:08:31 +0000 (10:08 +0200)]
Fixed bug #79947
Move the FREE_OP for op_data out of the zend_binary_assign_op_dim_slow()
slow path, so it can be used by the other error path as well. This
makes ASSIGN_DIM_OP structurally more similar to ASSIGN_DIM.
Nikita Popov [Mon, 10 Aug 2020 07:50:55 +0000 (09:50 +0200)]
Fixed bug #79946
Declare __STDC_CONSTANT_MACROS and __STDC_FORMAT_MACROS via -D
to make sure they are declared before the first stdint.h include.
We also define these in php_stdint.h, but don't always include that
file first.
This is necessary for old compilers that use C99 rather than C11
semantics for stdint.h.
David Carlier [Sat, 8 Aug 2020 16:30:15 +0000 (17:30 +0100)]
proc_open/openpty: DragonFlyBSD build fix.
Similarly to NetBSD emalloc-ish api had been introduced into libutil.
Closes GH-5960.
Nikita Popov [Mon, 10 Aug 2020 07:38:48 +0000 (09:38 +0200)]
Revert "Make diff section contents red(-)/green(+) in run-tests.php"
This reverts commit
58489bd3b93e10c150933eefac05297b48213eb3 .
This also uses ANSI escape code coloring for .diff files, where it
is not meaningful.
Tyson Andre [Sun, 9 Aug 2020 15:58:08 +0000 (11:58 -0400)]
Make diff section contents red(-)/green(+) in run-tests.php
This uses green for lines with `+` and red for lines with `-`.
Colors(Red and Green) would make the failure causes stand out visually when scrolling through errors.
Closes GH-5965
Tyson Andre [Sun, 9 Aug 2020 19:45:04 +0000 (15:45 -0400)]
Use short array values in run-tests.php
The run-tests.php file already requires php 7 syntax.
Done automatically with phpcbf with no other changes done/planned.
This file is already using short arrays in other places.
run-tests has already been substantially refactored in PHP 8.0
compared to PHP 7.4.
This makes merge conflicts more likely, but changes to run-tests.php on older
versions are less frequent bug fixes.
Máté Kocsis [Sun, 9 Aug 2020 09:06:57 +0000 (11:06 +0200)]
Add many missing closing PHP tags to tests
Closes GH-5958
Nikita Popov [Sat, 8 Aug 2020 08:38:31 +0000 (10:38 +0200)]
Fix m4 quotation
We should not try to expand AX_CHECK_COMPILE_FLAG inside the
error message...
George Peter Banyard [Fri, 7 Aug 2020 16:15:25 +0000 (18:15 +0200)]
Promote various warnings to Error in GMP extension
This gets rid of most false returns
Closes GH-5882
George Peter Banyard [Fri, 31 Jul 2020 18:02:59 +0000 (19:02 +0100)]
Add colours to test results in run-tests.php
The test runner will attempt to colourise the result of each test
The --no-color option is introduced to disable this feature.
Closes GH-5901
George Peter Banyard [Thu, 6 Aug 2020 15:27:13 +0000 (17:27 +0200)]
Drop '#if 0' in mysqlnd_debug() from the MySQLnd extension
Closes GH-5587
Nikita Popov [Fri, 7 Aug 2020 15:20:02 +0000 (17:20 +0200)]
Remove some duplicate iconv path logic
PHP_SETUP_ICONV already adds the include path to INCLUDES and the
library path to SHARED_LIBADD.
Nikita Popov [Fri, 7 Aug 2020 14:11:27 +0000 (16:11 +0200)]
Remove PHP_ICONV_H_PATH
Directly include <iconv.h> instead, now that the giconv.h
distinction no longer exists.
Nikita Popov [Fri, 7 Aug 2020 14:05:24 +0000 (16:05 +0200)]
Remove giconv support
The best information I was able to find about this is this mail
from 2009 which indicates that giconv is an old FreeBSD iconv
implementation that has long since been superseded by libiconv.
https://lists.samba.org/archive/samba-technical/2009-June/065177.html
Nikita Popov [Fri, 7 Aug 2020 13:54:01 +0000 (15:54 +0200)]
Remove more leftovers of PHP_DEFINE handling
David Carlier [Thu, 6 Aug 2020 15:10:24 +0000 (16:10 +0100)]
opcache gdb: Set the EI_OSABI value for NetBSD.
Closes GH-5948.
Máté Kocsis [Fri, 7 Aug 2020 14:48:39 +0000 (16:48 +0200)]
Add another round of missing parameter types to stubs
Closes GH-5950
Máté Kocsis [Fri, 7 Aug 2020 14:47:50 +0000 (16:47 +0200)]
Fix ZPP order in ext/phar
Nikita Popov [Fri, 7 Aug 2020 14:39:46 +0000 (16:39 +0200)]
Add UPGRADING.INTERNALS notes for zend_object* changes
Closes GH-5953.
Nikita Popov [Fri, 7 Aug 2020 13:27:57 +0000 (15:27 +0200)]
Accept zend_object* in zend_update_property
Nikita Popov [Fri, 7 Aug 2020 13:17:59 +0000 (15:17 +0200)]
Accept zend_object* in zend_unset_property
Nikita Popov [Fri, 7 Aug 2020 13:15:50 +0000 (15:15 +0200)]
Accept zend_object* in zend_get_exception_base
Nikita Popov [Fri, 7 Aug 2020 13:05:24 +0000 (15:05 +0200)]
Accept zend_object in zend_read_property
Christoph M. Becker [Fri, 7 Aug 2020 13:06:40 +0000 (15:06 +0200)]
Merge branch 'PHP-7.4' into master
* PHP-7.4:
Prevent tempnam tests conflicts
Christoph M. Becker [Fri, 7 Aug 2020 12:56:54 +0000 (14:56 +0200)]
Prevent tempnam tests conflicts
Nikita Popov [Fri, 7 Aug 2020 12:37:50 +0000 (14:37 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix bug #70574: Move files to proper locale dir
Nikita Popov [Fri, 7 Aug 2020 12:37:36 +0000 (14:37 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix bug #70574: Move files to proper locale dir
Florian Engelhardt [Wed, 5 Aug 2020 11:33:52 +0000 (13:33 +0200)]
Fix bug #70574: Move files to proper locale dir
Closes GH-5940.
Nikita Popov [Fri, 7 Aug 2020 10:40:47 +0000 (12:40 +0200)]
Don't use PHP_DEFINE in iconv
iconv is the only consumer of this custom define mechanism that
puts every define into a single file. Use the standard mechanism
instead.
Máté Kocsis [Wed, 5 Aug 2020 16:45:07 +0000 (18:45 +0200)]
Add more argument types to stubs
Closes GH-5943
Nikita Popov [Wed, 5 Aug 2020 09:27:13 +0000 (11:27 +0200)]
Reapply "Explicitly validate popen mode"
To avoid behavior differences due to libc. This time with the
check only for the non-win32 case, as Windows support additional
modifiers here (t/b).
Nikita Popov [Thu, 6 Aug 2020 19:53:13 +0000 (21:53 +0200)]
Revert "Explicitly validate popen mode"
This reverts commit
ab36540bddb63139c3da9a9da5e5feacdf7bf7bf .
Causes a test failure on Windows.
George Peter Banyard [Thu, 6 Aug 2020 18:37:36 +0000 (20:37 +0200)]
Add type information to test-runner
Closes GH-5942
George Peter Banyard [Thu, 6 Aug 2020 11:37:36 +0000 (13:37 +0200)]
Promote warnings to Error in FileInfo extension
Closes GH-5914
Nikita Popov [Thu, 6 Aug 2020 10:35:37 +0000 (12:35 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix file clash in zlib test
Nikita Popov [Thu, 6 Aug 2020 10:34:14 +0000 (12:34 +0200)]
Fix file clash in zlib test
Derick Rethans [Thu, 6 Aug 2020 10:14:39 +0000 (11:14 +0100)]
Mention security in step 3, as otherwise it might be overlooked
Nikita Popov [Thu, 6 Aug 2020 10:04:23 +0000 (12:04 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix #79934: CRLF-only line in heredoc causes parsing error
Nikita Popov [Thu, 6 Aug 2020 10:03:57 +0000 (12:03 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #79934: CRLF-only line in heredoc causes parsing error
Pieter van den Ham [Wed, 5 Aug 2020 18:21:26 +0000 (20:21 +0200)]
Fix #79934: CRLF-only line in heredoc causes parsing error
Fixes the function `next_newline()` in zend_language_scanner.l. The
function now correctly returns a newline_len of 2 for "\r\n".
Closes GH-5944.
Nikita Popov [Thu, 6 Aug 2020 09:28:35 +0000 (11:28 +0200)]
Avoid getThis() usages in zip extension
There isn't any magic going on here, we can just use ZEND_THIS
and assume it exists.
Nikita Popov [Wed, 5 Aug 2020 09:27:13 +0000 (11:27 +0200)]
Explicitly validate popen mode
To avoid behavior differences due to libc.
Nikita Popov [Wed, 5 Aug 2020 18:09:15 +0000 (20:09 +0200)]
Add GLOB_BRACE skipif
Nikita Popov [Wed, 5 Aug 2020 17:58:44 +0000 (19:58 +0200)]
Temporarily disable s390x job
These aren't getting scheduled and just keep hogging jobs so
nothing else gets scheduled either.
Nikita Popov [Wed, 5 Aug 2020 16:36:27 +0000 (18:36 +0200)]
Prefer strtoll over atoll
Both are specified by C99, but strtoll has specified overflow
behavior while atoll does not, so prefer using it.
Nikita Popov [Wed, 5 Aug 2020 16:18:51 +0000 (18:18 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Check ps -p availability in process title test
Add privilege check in pcntl_unshare test
Nikita Popov [Wed, 5 Aug 2020 10:23:27 +0000 (12:23 +0200)]
Check ps -p availability in process title test
Nikita Popov [Wed, 5 Aug 2020 07:53:22 +0000 (09:53 +0200)]
Add privilege check in pcntl_unshare test
Privileges for CLONE_NEWPID were not checked.
Nikita Popov [Wed, 5 Aug 2020 10:57:47 +0000 (12:57 +0200)]
Only force log startup errors if display_startup_errors disabled
Otherwise this results in duplicate errors.
Closes GH-5941.
Nikita Popov [Wed, 5 Aug 2020 14:44:06 +0000 (16:44 +0200)]
Normalize error message capitalization
Nikita Popov [Wed, 5 Aug 2020 14:42:40 +0000 (16:42 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix memory leak on socket_sendmsg() / socket_recvmsg() error
Nikita Popov [Wed, 5 Aug 2020 14:42:13 +0000 (16:42 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix memory leak on socket_sendmsg() / socket_recvmsg() error
Nikita Popov [Wed, 5 Aug 2020 08:55:41 +0000 (10:55 +0200)]
Fix memory leak on socket_sendmsg() / socket_recvmsg() error
Nikita Popov [Wed, 5 Aug 2020 13:44:04 +0000 (15:44 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fixed bug #79930
Fix iov_base pointer type for illumos
Backport bless_tests.php changes from PHP 8
Nikita Popov [Wed, 5 Aug 2020 13:43:49 +0000 (15:43 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fixed bug #79930
Nikita Popov [Wed, 5 Aug 2020 13:41:42 +0000 (15:41 +0200)]
Fixed bug #79930
We're inserting src_zval, so that's what we should addref.
Nikita Popov [Wed, 5 Aug 2020 13:18:03 +0000 (15:18 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix iov_base pointer type for illumos
David Carlier [Wed, 5 Aug 2020 09:09:18 +0000 (10:09 +0100)]
Fix iov_base pointer type for illumos
These systems has two versions of the iovec interface dependent on
compiler flags passed, the legacy version causing little build issue.
Closes GH-5939.
Nikita Popov [Wed, 5 Aug 2020 12:59:56 +0000 (14:59 +0200)]
Backport bless_tests.php changes from PHP 8