]>
granicus.if.org Git - php/log
Nikita Popov [Mon, 3 Aug 2020 12:48:40 +0000 (14:48 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
set -ex on travis/compile.sh
Nikita Popov [Mon, 3 Aug 2020 12:48:18 +0000 (14:48 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
set -ex on travis/compile.sh
Santiago M. Mola [Sat, 1 Aug 2020 15:43:08 +0000 (17:43 +0200)]
set -ex on travis/compile.sh
-e to fail early: ./configure may fail and further errors from make bury
the original problem in the logs.
-x for easier debugging
Nikita Popov [Mon, 3 Aug 2020 09:26:54 +0000 (11:26 +0200)]
Promote "undefined array key" notice to warning
This implements the last remaining part of the
https://wiki.php.net/rfc/engine_warnings RFC.
Closes GH-5927.
Christoph M. Becker [Mon, 3 Aug 2020 10:01:12 +0000 (12:01 +0200)]
Fix fix for bug #79877 for PHP 8
PHP 8 is supposed to throw here.
Nikita Popov [Mon, 3 Aug 2020 09:58:28 +0000 (11:58 +0200)]
Don't suppress notices in rfc1867 tests
The references notices in debug builds don't seem to be present
anymore.
Christoph M. Becker [Mon, 3 Aug 2020 09:21:39 +0000 (11:21 +0200)]
Merge branch 'PHP-7.4' into master
* PHP-7.4:
[ci skip] Add missing NEWS entries
Christoph M. Becker [Mon, 3 Aug 2020 09:18:45 +0000 (11:18 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
[ci skip] Add missing NEWS entries
Christoph M. Becker [Mon, 3 Aug 2020 09:08:31 +0000 (11:08 +0200)]
[ci skip] Add missing NEWS entries
Nikita Popov [Mon, 3 Aug 2020 09:16:59 +0000 (11:16 +0200)]
Convert SPL illegal offset type into TypeError
Make this consistent with the corresponding engine behavior.
Also adjust the messages to match.
Christoph M. Becker [Mon, 3 Aug 2020 09:15:24 +0000 (11:15 +0200)]
Merge branch 'PHP-7.4' into master
* PHP-7.4:
Fix #79877: getimagesize function silently truncates after a null byte
Fix #79797: Use of freed hash key in the phar_parse_zipfile function
Fix #79877: getimagesize function silently truncates after a null byte
Fix #79797: Use of freed hash key in the phar_parse_zipfile function
Christoph M. Becker [Mon, 3 Aug 2020 09:13:49 +0000 (11:13 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #79877: getimagesize function silently truncates after a null byte
Fix #79797: Use of freed hash key in the phar_parse_zipfile function
Gregor Harlan [Sun, 26 Jul 2020 18:29:40 +0000 (20:29 +0200)]
datetime: new format "p", same as "P" but returning "Z" for UTC
Nikita Popov [Mon, 3 Aug 2020 08:34:39 +0000 (10:34 +0200)]
Fix bug #79925
If the expected return type of a magic method is "object", we also
need to allow class types and "static" to comply with covariance.
Nikita Popov [Mon, 3 Aug 2020 08:23:06 +0000 (10:23 +0200)]
Enforce __set_state() parameter type
This fixes one of the issues reported in bug #79925. The parameter
type check for this particular method was missed.
Nikita Popov [Mon, 3 Aug 2020 08:16:04 +0000 (10:16 +0200)]
Fix handling of nullsafe method in empty()
Fixes oss-fuzz #24627.
Christoph M. Becker [Tue, 21 Jul 2020 09:07:43 +0000 (11:07 +0200)]
Fix #79877: getimagesize function silently truncates after a null byte
We have to check for NUL bytes if `getimagesize()` has been called.
Christoph M. Becker [Tue, 14 Jul 2020 15:04:24 +0000 (17:04 +0200)]
Fix #79797: Use of freed hash key in the phar_parse_zipfile function
We must not use heap memory after we freed it.
Christoph M. Becker [Tue, 21 Jul 2020 09:07:43 +0000 (11:07 +0200)]
Fix #79877: getimagesize function silently truncates after a null byte
We have to check for NUL bytes if `getimagesize()` has been called.
Christoph M. Becker [Tue, 14 Jul 2020 15:04:24 +0000 (17:04 +0200)]
Fix #79797: Use of freed hash key in the phar_parse_zipfile function
We must not use heap memory after we freed it.
Christoph M. Becker [Mon, 3 Aug 2020 07:15:50 +0000 (09:15 +0200)]
Merge branch 'PHP-7.4' into master
* PHP-7.4:
Enable libxml entity loader test case on Windows
Christoph M. Becker [Mon, 3 Aug 2020 07:12:46 +0000 (09:12 +0200)]
Enable libxml entity loader test case on Windows
Stanislav Malyshev [Mon, 3 Aug 2020 06:56:37 +0000 (23:56 -0700)]
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
Fix #79877: getimagesize function silently truncates after a null byte
Fix #79797: Use of freed hash key in the phar_parse_zipfile function
tangl163 [Sat, 1 Aug 2020 03:56:16 +0000 (11:56 +0800)]
Drop the unneeded pointer casting
The standard says that "A pointer to void may be converted to or from a
pointer to any object type". So the casting is unneeded.
REF:
* c11: http://port70.net/~nsz/c/c11/n1570.html#6.3.2.3p1
* c99: http://port70.net/~nsz/c/c99/n1256.html
Closes GH-5916
Derick Rethans [Sun, 2 Aug 2020 23:41:31 +0000 (00:41 +0100)]
Fixed bug #60302: DateTime::createFromFormat should new static(), not new self()
Also fixes similar issues for DateTimeImmutable::createFromFormat,
DateTime::createFromImmmutable, DateTime::createFromInterface,
DateTimeImmutable::createFromMutable, and
DateTimeImmutable::createFromInterface.
Máté Kocsis [Sun, 2 Aug 2020 23:06:21 +0000 (01:06 +0200)]
Fix stub hash of ext/ldap
Máté Kocsis [Sun, 2 Aug 2020 22:45:51 +0000 (00:45 +0200)]
Add a bunch of missing argument types to stubs
Máté Kocsis [Sun, 2 Aug 2020 22:45:12 +0000 (00:45 +0200)]
Improve a few parameter names in ext/spl
Use the same names which are used by zend functions.
Máté Kocsis [Sun, 2 Aug 2020 22:38:59 +0000 (00:38 +0200)]
Convert the $ttl parameter of ldap_exop_refresh() to int
Christoph M. Becker [Tue, 21 Jul 2020 09:07:43 +0000 (11:07 +0200)]
Fix #79877: getimagesize function silently truncates after a null byte
We have to check for NUL bytes if `getimagesize()` has been called.
Christoph M. Becker [Tue, 14 Jul 2020 15:04:24 +0000 (17:04 +0200)]
Fix #79797: Use of freed hash key in the phar_parse_zipfile function
We must not use heap memory after we freed it.
Nikita Popov [Sun, 2 Aug 2020 08:10:54 +0000 (10:10 +0200)]
Bump timeouts, again
Now that we're testing an additional JIT configuration in nightly
builds, the jobs are running close to an hour.
[ci skip]
Gabriel Caruso [Fri, 31 May 2019 03:45:32 +0000 (00:45 -0300)]
Ensure correct signatures for magic methods
Tyson Andre [Sat, 1 Aug 2020 15:44:03 +0000 (11:44 -0400)]
[skip ci] Fix grammar/typo nits in docs
The PHP error message says "well-formed", not "well formed"
Fixes GH-5920
Máté Kocsis [Sat, 1 Aug 2020 21:54:28 +0000 (23:54 +0200)]
Add a few missing types to stubs
Nikita Popov [Sat, 1 Aug 2020 21:50:56 +0000 (23:50 +0200)]
Bump timeout again
Máté Kocsis [Sat, 1 Aug 2020 20:42:26 +0000 (22:42 +0200)]
Convert resources to objects in ext/openssl
Closes GH-5860
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
Tyson Andre [Sat, 18 Jul 2020 21:54:59 +0000 (17:54 -0400)]
Allow overriding completion in `auto_prepend_file`
Currently, it's possible to override `php -a`s completion
functionality to provide an alternative to the C implementation,
with `readline_completion_function()`.
However, that surprisingly gets overridden when called from
`auto_prepend_file`, because those scripts get run before the interactive shell
is started. I believe that not overriding it would be more consistent
with what happens when you override the completion function **after** the
interactive shell.
CLI is the only built-in API that uses this (See discussion in GH-5872).
I believe MINIT and RINIT will only run once when invoked with `php -a`.
Add documentation about the architecture of how php uses readline/libedit
Closes GH-5872
Máté Kocsis [Sat, 1 Aug 2020 07:42:04 +0000 (09:42 +0200)]
Get rid of empty function entries
Closes GH-5917
Nikita Popov [Mon, 6 Apr 2020 10:46:52 +0000 (12:46 +0200)]
Implement named parameters
From an engine perspective, named parameters mainly add three
concepts:
* The SEND_* opcodes now accept a CONST op2, which is the
argument name. For now, it is looked up by linear scan and
runtime cached.
* This may leave UNDEF arguments on the stack. To avoid having
to deal with them in other places, a CHECK_UNDEF_ARGS opcode
is used to either replace them with defaults, or error.
* For variadic functions, EX(extra_named_params) are collected
and need to be freed based on ZEND_CALL_HAS_EXTRA_NAMED_PARAMS.
RFC: https://wiki.php.net/rfc/named_params
Closes GH-5357.
George Peter Banyard [Fri, 31 Jul 2020 13:34:39 +0000 (14:34 +0100)]
Throw ValueError on empty tag in enchant_broker_request_dict()
George Peter Banyard [Fri, 31 Jul 2020 13:11:10 +0000 (14:11 +0100)]
Change leftover RETURN_FALSE to RETURN_THROWS() from
4095c0a
George Peter Banyard [Fri, 31 Jul 2020 13:01:05 +0000 (14:01 +0100)]
Promote empty filename to ValueError in BZ2 extension
George Peter Banyard [Tue, 28 Jul 2020 13:50:41 +0000 (14:50 +0100)]
ValueError for empty path in stream code
Closes GH-5902
George Peter Banyard [Fri, 31 Jul 2020 12:27:22 +0000 (13:27 +0100)]
Warning to ValueError promotion in Intl extension Part 1
Affects:
- IntlCalendar
- IntlGregorianCalendar
- IntlBreakIterator
Closes GH-5669
Nikita Popov [Thu, 30 Jul 2020 08:38:11 +0000 (10:38 +0200)]
Update i386 job to Ubuntu 20.04
Nikita Popov [Thu, 30 Jul 2020 08:34:41 +0000 (10:34 +0200)]
Also run function jit tests on macos
Nikita Popov [Fri, 31 Jul 2020 10:00:56 +0000 (12:00 +0200)]
Make check in RECV_VARIADIC more precise
Fetch arg_info only once (it's always the same one...) and check
ZEND_TYPE_IS_SET on it, rather than checking if *any* parameter
has a type.
Dmitry Stogov [Fri, 31 Jul 2020 09:31:46 +0000 (12:31 +0300)]
Fixed JIT when result of ASSIGN is in register, but the original variable might need to be destroyed
Christoph M. Becker [Fri, 31 Jul 2020 08:59:17 +0000 (10:59 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix #79919: Stack use-after-scope in define()
Christoph M. Becker [Fri, 31 Jul 2020 08:56:29 +0000 (10:56 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #79919: Stack use-after-scope in define()
Christoph M. Becker [Fri, 31 Jul 2020 07:12:22 +0000 (09:12 +0200)]
Fix #79919: Stack use-after-scope in define()
Instead of the temporary `rv`, we use the `val_free` which is there for
this purpose.
Máté Kocsis [Fri, 31 Jul 2020 08:04:49 +0000 (10:04 +0200)]
Document the signature change of zend_get_closure_method_def()
Máté Kocsis [Fri, 31 Jul 2020 08:01:08 +0000 (10:01 +0200)]
Fix the default value handling of imagegif()
Nikita Popov [Thu, 30 Jul 2020 16:08:11 +0000 (18:08 +0200)]
Remove more unused func_info fields
Dmitry Stogov [Thu, 30 Jul 2020 16:19:10 +0000 (19:19 +0300)]
We check result type guard in FETCH_DIM_R/IS only if index is long or string.
Nikita Popov [Thu, 30 Jul 2020 15:14:34 +0000 (17:14 +0200)]
Add type inference support for RECV_VARIADIC
Nikita Popov [Thu, 30 Jul 2020 15:04:56 +0000 (17:04 +0200)]
Remove unused recv_arg_info from func_info
Nikita Popov [Thu, 30 Jul 2020 14:53:11 +0000 (16:53 +0200)]
Remove some dead code in RECV type inference
We must always have arg_info corresponding to RECV.
Dmitry Stogov [Thu, 30 Jul 2020 14:01:08 +0000 (17:01 +0300)]
Clear result type for exit point caused by JMPZ_EX/NZ_EX
Dmitry Stogov [Thu, 30 Jul 2020 13:59:41 +0000 (16:59 +0300)]
Fixed memory leaks caused by incorrect AVOID_REFCOUNTING flag
Máté Kocsis [Thu, 30 Jul 2020 12:55:13 +0000 (14:55 +0200)]
Add missing RETURN_THROWS()
Máté Kocsis [Tue, 28 Jul 2020 21:00:44 +0000 (23:00 +0200)]
Add a few missing parameter types in stubs
Related to GH-5627
Dmitry Stogov [Thu, 30 Jul 2020 11:04:14 +0000 (14:04 +0300)]
Skip tests leaking because of preloading failure.
Deus Kane [Sat, 25 Jul 2020 11:02:01 +0000 (12:02 +0100)]
Fixed bug #79897: Promoted constructor params with attribs cause crash
This was caused by the attribute AST being used twice, and was fixed by
creating a temporary copy of it (and destroying said copy) when neccesary.
Nikita Popov [Thu, 30 Jul 2020 08:17:37 +0000 (10:17 +0200)]
Check non-zero in is_power_of_two()
And assert non-zero in floor_log2().
Fixes DASM_S_RANGE_I in ext/simplexml/tests/021.phpt.
Nikita Popov [Thu, 30 Jul 2020 07:54:51 +0000 (09:54 +0200)]
Increase timeout on asan job
We now also run tests with function JIT here, which makes this
slower.
Probably, this job should be split up into asan and ubsan, and
possibly run with optimization.
[ci skip]
Theodore Brown [Wed, 29 Jul 2020 23:39:54 +0000 (17:39 -0600)]
Improve wording and spelling consistency in UPGRADING
[ci skip]
Dmitry Stogov [Wed, 29 Jul 2020 22:32:23 +0000 (01:32 +0300)]
Force type update if the previous value was in register only
Dmitry Stogov [Wed, 29 Jul 2020 21:31:46 +0000 (00:31 +0300)]
Don't skip fcall guard for method calls from trait
Dmitry Stogov [Wed, 29 Jul 2020 19:01:19 +0000 (22:01 +0300)]
Fixed temporary register usage
Christoph M. Becker [Wed, 29 Jul 2020 16:45:03 +0000 (18:45 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Amendment to OPcache base file removal
Christoph M. Becker [Wed, 29 Jul 2020 16:44:35 +0000 (18:44 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Amendment to OPcache base file removal
Christoph M. Becker [Wed, 29 Jul 2020 16:06:42 +0000 (18:06 +0200)]
Amendment to OPcache base file removal
We fix the erroneous segment size. We also keep the segment pointer at
the allocated address, but increase the position instead.
Christoph M. Becker [Wed, 29 Jul 2020 16:31:28 +0000 (18:31 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix #73060: php failed with error after temp folder cleaned up
Nikita Popov [Wed, 29 Jul 2020 15:09:47 +0000 (17:09 +0200)]
Update azure macos builds to 10.15
Closes GH-5908.
Christoph M. Becker [Wed, 29 Jul 2020 13:11:04 +0000 (15:11 +0200)]
Fix #73060: php failed with error after temp folder cleaned up
Instead of storing the mapping base address and the address of
`execute_ex()` in a separate file in the temporary folder, we store
them right at the beginning of the memory mapping.
Nikita Popov [Wed, 29 Jul 2020 14:39:16 +0000 (16:39 +0200)]
Run function JIT tests in nightly build
Changing this for primary x64 and i386 jobs for now.
The different test configurations are now consolidated in one
file shared between both.
Nikita Popov [Wed, 29 Jul 2020 15:05:42 +0000 (17:05 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Consider op1 literal of FETCH_OBJ_R
Nikita Popov [Wed, 29 Jul 2020 15:05:35 +0000 (17:05 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Consider op1 literal of FETCH_OBJ_R
Nikita Popov [Wed, 29 Jul 2020 15:04:23 +0000 (17:04 +0200)]
Consider op1 literal of FETCH_OBJ_R
FETCH_OBJ_R may have an op1 CONST operand, even though it will
always error. We should take this into account when compacting
literals.
Dmitry Stogov [Wed, 29 Jul 2020 14:37:01 +0000 (17:37 +0300)]
Load ptoper IP value
Dmitry Stogov [Wed, 29 Jul 2020 14:32:57 +0000 (17:32 +0300)]
Fixed bug #79888 (Incorrect execution with JIT enabled)
Nikita Popov [Wed, 29 Jul 2020 13:51:47 +0000 (15:51 +0200)]
Fix leak with nullsafe operator with constant LHS
Followup to
5303bcdd32e8171399c2c60bf431e5304a66c39a . We need to
perform the addref after emitting the opline, because that might
intern the string.
Fixes oss-fuzz #24479.
Nikita Popov [Wed, 29 Jul 2020 13:25:57 +0000 (15:25 +0200)]
Fix bug #79900
Run debug build shutdown GC regardless even if GC has been disabled.
Of course, this only does something meaningful if the GC has been
disabled at runtime and root collection is still enabled. We cannot
prevent leaks if GC is disabled completely.
Nikita Popov [Wed, 29 Jul 2020 10:45:26 +0000 (12:45 +0200)]
Remove PHP_CHECK_GCC_ARG()
In favor of AX_CHECK_COMPILE_FLAG(), which we bundle since at least
PHP 7.
Closes GH-5904.
Nikita Popov [Wed, 29 Jul 2020 13:04:41 +0000 (15:04 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix test
Nikita Popov [Wed, 29 Jul 2020 13:04:23 +0000 (15:04 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix test
Nikita Popov [Wed, 29 Jul 2020 13:04:05 +0000 (15:04 +0200)]
Fix test
Dmitry Stogov [Wed, 29 Jul 2020 11:58:41 +0000 (14:58 +0300)]
Temporary disable abstract test usage for inferring previous type of variables (previous value may be in CPU register and type of the stack slot may be inconsistent).
Christoph M. Becker [Wed, 29 Jul 2020 11:37:50 +0000 (13:37 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Revert "Merge branch 'PHP-7.3' into PHP-7.4"
Christoph M. Becker [Wed, 29 Jul 2020 11:32:59 +0000 (13:32 +0200)]
Revert "Merge branch 'PHP-7.3' into PHP-7.4"
This reverts commit
e1f6ab3388f509782857557ee1e40a66b2bb6455 , reversing
changes made to
e0ebe56ebfc80bae3875b23eca4cbe0803f41e79 .
There are obviously issues with running tests in parallel, maybe
related to the cache ID. This needs to be investigated. Revert for
now.
Christoph M. Becker [Wed, 29 Jul 2020 10:47:41 +0000 (12:47 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Prevent test case from stalling
Christoph M. Becker [Wed, 29 Jul 2020 10:33:46 +0000 (12:33 +0200)]
Prevent test case from stalling
If the CTRL-C event can't be sent to the child for whatever reason, the
test will never terminate, because `proc_close()` waits for an infinite
amount of time. Therefore, we `proc_terminate()` the child instead,
after explicitly closing the pipes.
Nikita Popov [Wed, 29 Jul 2020 10:39:58 +0000 (12:39 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix #79895: support = in PHP_CHECK_GCC_ARG m4 macro
Nikita Popov [Wed, 29 Jul 2020 10:38:35 +0000 (12:38 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #79895: support = in PHP_CHECK_GCC_ARG m4 macro
Santiago M. Mola [Fri, 24 Jul 2020 20:46:11 +0000 (22:46 +0200)]
Fix #79895: support = in PHP_CHECK_GCC_ARG m4 macro
Closes GH-5890.
Dmitry Stogov [Wed, 29 Jul 2020 10:11:27 +0000 (13:11 +0300)]
Fixed live-range interval construction (close all frames)
twosee [Wed, 29 Jul 2020 09:48:01 +0000 (17:48 +0800)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Handle bindto error
twosee [Wed, 29 Jul 2020 09:46:57 +0000 (17:46 +0800)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Handle bindto error