]>
granicus.if.org Git - php/log
Nikita Popov [Wed, 8 Apr 2020 10:00:48 +0000 (12:00 +0200)]
Update mb_strrpos() stub
We no longer accept the encoding as 3rd param, so we can make this
a proper int argument.
Dmitry Stogov [Wed, 8 Apr 2020 09:39:24 +0000 (12:39 +0300)]
Dump information about trace side exits
Christoph M. Becker [Wed, 8 Apr 2020 09:35:28 +0000 (11:35 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Relax overly strict test expectation
Christoph M. Becker [Wed, 8 Apr 2020 09:29:49 +0000 (11:29 +0200)]
Relax overly strict test expectation
There is no reason to expect a `1` after the PID; neither the session
ID nor the memory usage are required to contain one. Actually, we just
want to verify here, that the process with the $child_pid is running,
and is a php.exe process.
Christoph M. Becker [Wed, 8 Apr 2020 08:37:28 +0000 (10:37 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix memory leak introduced by fixing bug #78221
Christoph M. Becker [Wed, 8 Apr 2020 08:36:57 +0000 (10:36 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix memory leak introduced by fixing bug #78221
Christoph M. Becker [Wed, 8 Apr 2020 08:35:54 +0000 (10:35 +0200)]
Fix memory leak introduced by fixing bug #78221
We have to free the retrieved text content; to keep the code readable,
we extract a helper function to check for empty nodes. Unfortunately,
we cannot use xmlIsBlankNode(), because that also recognizes whitespace
only text content.
We also make sure to properly handle NULL returns from
xmlNodeGetContent().
Nikita Popov [Wed, 8 Apr 2020 07:41:26 +0000 (09:41 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix test
Nikita Popov [Wed, 8 Apr 2020 07:41:14 +0000 (09:41 +0200)]
Fix test
Dmitry Stogov [Wed, 8 Apr 2020 07:34:24 +0000 (10:34 +0300)]
Update stack type, only if necessary
Dmitry Stogov [Tue, 7 Apr 2020 21:27:19 +0000 (00:27 +0300)]
Fixed TYPE/INFO mismatch
George Peter Banyard [Tue, 7 Apr 2020 20:49:17 +0000 (22:49 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Revert "Went to fast and forgot to update tests"
Revert "Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails"
George Peter Banyard [Tue, 7 Apr 2020 20:27:00 +0000 (22:27 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Revert "Went to fast and forgot to update tests"
Revert "Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails"
George Peter Banyard [Tue, 7 Apr 2020 20:24:40 +0000 (22:24 +0200)]
Revert "Went to fast and forgot to update tests"
This reverts commit
656eac74fa6074aebc087bb73d2e4651f7dc8c9e .
George Peter Banyard [Tue, 7 Apr 2020 20:23:24 +0000 (22:23 +0200)]
Revert "Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails"
This commit brings some substantial changes in behaviour due to the weird implementation.
This will be fixed in master due to BC concerns.
This reverts commit
1333b46d6dc0c293c1fd626803f91bc69743eb79 .
Dmitry Stogov [Tue, 7 Apr 2020 18:37:10 +0000 (21:37 +0300)]
cleanup
Dmitry Stogov [Tue, 7 Apr 2020 18:34:18 +0000 (21:34 +0300)]
Revert "cleanup" (wrong commit)
This reverts commit
5db5f71f2831df4d32484a5638f6f6aa72e364a5 .
Dmitry Stogov [Tue, 7 Apr 2020 18:30:47 +0000 (21:30 +0300)]
cleanup
Nikita Popov [Tue, 7 Apr 2020 14:42:40 +0000 (16:42 +0200)]
Remove most uses of _default_get_name()
Instead fetch the name from the respective structure. The only
place where this is still used is ReflectionClassConst,
as zend_class_const does not store the name.
Nikita Popov [Tue, 7 Apr 2020 14:25:44 +0000 (16:25 +0200)]
Eliminate uses of _default_load_name()
Instead fetch the name from the function/class/property,
as appropriate. This makes us independent of the property,
and eliminates error conditions related to it.
Nikita Popov [Tue, 7 Apr 2020 14:10:19 +0000 (16:10 +0200)]
Optimize internal name fetching in reflection
Directly fetch the name property, instead of construction the
properties hash table and performing a lookup in it. This is both
slow and wastes a lot of memory.
Nikita Popov [Tue, 7 Apr 2020 14:05:33 +0000 (16:05 +0200)]
Assert that arginfo parameter name is present
Christoph M. Becker [Tue, 7 Apr 2020 11:09:10 +0000 (13:09 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix #78221: DOMNode::normalize() doesn't remove empty text nodes
Christoph M. Becker [Tue, 7 Apr 2020 11:05:37 +0000 (13:05 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #78221: DOMNode::normalize() doesn't remove empty text nodes
Christoph M. Becker [Wed, 11 Mar 2020 12:02:09 +0000 (13:02 +0100)]
Fix #78221: DOMNode::normalize() doesn't remove empty text nodes
If a text node is not followed by another text node, we remove it, if
its textContent is empty.
Dmitry Stogov [Tue, 7 Apr 2020 09:01:48 +0000 (12:01 +0300)]
Free room for information about register allocation at astact stack and at trace_exit_info. Implement simple deoptimizer.
Dmitry Stogov [Mon, 6 Apr 2020 20:48:20 +0000 (23:48 +0300)]
Save CPU regesters on side exit for deoptimization
Dmitry Stogov [Mon, 6 Apr 2020 13:17:02 +0000 (16:17 +0300)]
Minor register allocator refactoring
Christoph M. Becker [Mon, 6 Apr 2020 10:03:01 +0000 (12:03 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix #69264: __debugInfo() ignored while extending SPL classes
Christoph M. Becker [Mon, 6 Apr 2020 09:02:15 +0000 (11:02 +0200)]
Fix #69264: __debugInfo() ignored while extending SPL classes
We actually implement `::__debugInfo()` and drop the `get_debug_info()`
handlers of all relevant SPL classes. This is cleaner and gives more
flexibility regarding overriding the functionality in descendant
classes.
Nikita Popov [Mon, 6 Apr 2020 09:41:44 +0000 (11:41 +0200)]
Inline a ZEND_NUM_ARGS() variable
Christoph M. Becker [Mon, 6 Apr 2020 08:51:10 +0000 (10:51 +0200)]
Clean up constructor handling in com_dotnet
We substitute the construction magic with standard constructors, move
the ZPP checks to the beginning of the ctors, and also let the function
entries be generated from the stubs.
Máté Kocsis [Wed, 1 Apr 2020 21:32:39 +0000 (23:32 +0200)]
Improve some ValueError messages
Closes GH-5340
Máté Kocsis [Sun, 5 Apr 2020 19:15:30 +0000 (21:15 +0200)]
Generate function entries for another batch of extensions
Closes GH-5352
Máté Kocsis [Sun, 5 Apr 2020 18:09:58 +0000 (20:09 +0200)]
Add missing stub for xmlrpc_get_type()
George Peter Banyard [Sun, 5 Apr 2020 01:33:08 +0000 (03:33 +0200)]
Promote invalid case mode to ValueError in mb_case_converter
Add assertions to check the return value is not NULL as this indicates a bug.
Add identical assertion to mb_strtoupper and mb_strtolower.
This means these functions can't return false anymore, ammend stubs accordingly.
George Peter Banyard [Fri, 3 Apr 2020 17:20:26 +0000 (19:20 +0200)]
mb_scrub() can't return false anymore
Also drop the intermediary function which was only used here
George Peter Banyard [Fri, 3 Apr 2020 17:14:42 +0000 (19:14 +0200)]
Promote some warnings to ValueError in mbstring
Promoted warnings are:
* Empty encoding lists
* Unknown language
* Start and Width out of bound
George Peter Banyard [Fri, 3 Apr 2020 16:20:43 +0000 (18:20 +0200)]
Convert some if blocks to assertions
Máté Kocsis [Sat, 4 Apr 2020 21:51:10 +0000 (23:51 +0200)]
Generate functions entries from stubs for another set of extensions
Closes GH-5351
Máté Kocsis [Sat, 4 Apr 2020 22:03:08 +0000 (00:03 +0200)]
Move variable declaration closer to its usage
Máté Kocsis [Sat, 4 Apr 2020 19:26:46 +0000 (21:26 +0200)]
Improve gen_stub.php
Closes GH-5350
Add support for generating deprecated function entries, as well as forward declaration
of function aliases.
Máté Kocsis [Sat, 4 Apr 2020 18:41:42 +0000 (20:41 +0200)]
Generate function entries from stubs for a couple of extensions
Closes GH-5347
Máté Kocsis [Sat, 4 Apr 2020 11:03:16 +0000 (13:03 +0200)]
Annotate function aliases in stubs
George Peter Banyard [Fri, 3 Apr 2020 20:23:03 +0000 (22:23 +0200)]
Merge branch 'PHP-7.4'
George Peter Banyard [Fri, 3 Apr 2020 20:10:56 +0000 (22:10 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
George Peter Banyard [Fri, 3 Apr 2020 20:03:00 +0000 (22:03 +0200)]
Went to fast and forgot to update tests
However due to the really lax conversion to integer all strings pass as 0
George Peter Banyard [Fri, 3 Apr 2020 19:30:35 +0000 (21:30 +0200)]
Merge branch 'PHP-7.4'
George Peter Banyard [Fri, 3 Apr 2020 19:28:07 +0000 (21:28 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
George Peter Banyard [Fri, 3 Apr 2020 19:16:04 +0000 (21:16 +0200)]
Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails
Nikita Popov [Fri, 3 Apr 2020 16:21:40 +0000 (18:21 +0200)]
Fix stub for zend_terminate_string()
Nikita Popov [Fri, 3 Apr 2020 14:49:11 +0000 (16:49 +0200)]
Verify that all stubs have a return type
Nikita Popov [Fri, 3 Apr 2020 14:18:47 +0000 (16:18 +0200)]
Stubs: Store information per-class
We'll need this if we want to generate method entries.
Nikita Popov [Fri, 3 Apr 2020 13:10:30 +0000 (15:10 +0200)]
Remove now unnecessary PHP_FUNCTION() declarations
Nikita Popov [Fri, 21 Feb 2020 14:08:56 +0000 (15:08 +0100)]
Generate function entries from stubs
If @generate-function-entries is specified in the stub file,
also generate function entries for the extension.
Currently limited to free functions only.
Máté Kocsis [Sun, 29 Mar 2020 18:24:16 +0000 (20:24 +0200)]
Do not include the same stub multiple times
Closes GH-5322
Christoph M. Becker [Fri, 3 Apr 2020 12:11:04 +0000 (14:11 +0200)]
Fix #68690: Hypothetical off-by-one condition
We fix this, even though `filter->cache == jisx0213_u2_tbl_len` can
never be true here.
George Peter Banyard [Wed, 1 Apr 2020 12:40:15 +0000 (14:40 +0200)]
Promote unknown encoding throws in encoding array/string list
For the string list we emit still emit a warning by comparing arg_num to 0
Closes GH-5337
Remi Collet [Thu, 2 Apr 2020 14:48:43 +0000 (16:48 +0200)]
add some output when generating arginfo
Remi Collet [Thu, 2 Apr 2020 14:34:05 +0000 (16:34 +0200)]
Move gen_stub.php to build directory and install it so phpize can take care of it, and thus extension can use it as it is already in Makefile
Nikita Popov [Fri, 3 Apr 2020 08:06:52 +0000 (10:06 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix incorrect free for last_message
Nikita Popov [Fri, 3 Apr 2020 08:06:09 +0000 (10:06 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix incorrect free for last_message
Qianqian Bu [Fri, 3 Apr 2020 07:44:41 +0000 (15:44 +0800)]
Fix incorrect free for last_message
In commit
a7305eb539596e175bd6c3ae9a20953358c5d677 the last_message
field of the connection object was changed to be always non-persistent.
But there is a place on change_user path that still treats it
depending on conn->persistent flag. This will cause PHP crash after
com_change_user success when there is last_message set
George Peter Banyard [Thu, 2 Apr 2020 20:38:28 +0000 (22:38 +0200)]
Refactor mb_substr_count()
Promote empty needle warning to ValueError
Convert if branch into an assertion as if mbfl_substr_count fails this now implies a bug
Thus mb_substr_count() can only return int now, fix stubs accordingly
George Peter Banyard [Thu, 2 Apr 2020 20:10:02 +0000 (22:10 +0200)]
Convert if branch to assertion in mb_strlen
This operation should never fail, therefore it's converted to an assertion.
Thus this mb_strlen() can now only return int, fix stubs accordingly
George Peter Banyard [Thu, 2 Apr 2020 19:57:38 +0000 (21:57 +0200)]
Promote mb_str_split warning to ValueError
Also add a TODO about documenting this funcion on PHP.net
Convert some checks to assertions as if they don't hold something went wrong during memory allocation
Due to these changes this function cannot return false anymore, fix stubs accordingly
George Peter Banyard [Thu, 2 Apr 2020 18:48:09 +0000 (20:48 +0200)]
Merge mb_strstr() variants under a common implementation
This reduces heavy ducplicate code
George Peter Banyard [Thu, 2 Apr 2020 17:41:30 +0000 (19:41 +0200)]
Improve code flow
These nested if-else blocks are unnecessary since we return early.
George Peter Banyard [Thu, 2 Apr 2020 16:43:57 +0000 (18:43 +0200)]
Use ZEND_NUM_ARGS() macro instead of custom variable
Also why on earth would someone do this?
George Peter Banyard [Thu, 2 Apr 2020 16:35:20 +0000 (18:35 +0200)]
Promote empty string warning to ValueError in mb_ord()
Nikita Popov [Thu, 2 Apr 2020 14:34:51 +0000 (16:34 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fixed bug #79434
Nikita Popov [Thu, 2 Apr 2020 14:34:21 +0000 (16:34 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fixed bug #79434
Nikita Popov [Thu, 2 Apr 2020 14:32:57 +0000 (16:32 +0200)]
Fixed bug #79434
Matteo Beccati [Thu, 2 Apr 2020 14:17:24 +0000 (16:17 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Skip fpm tests not designed to be run as root
Allow fpm tests to be run with long socket path
Matteo Beccati [Wed, 1 Apr 2020 16:28:34 +0000 (18:28 +0200)]
Skip fpm tests not designed to be run as root
When running as root with TEST_FPM_RUN_AS_ROOT=1
Matteo Beccati [Wed, 1 Apr 2020 16:14:25 +0000 (18:14 +0200)]
Allow fpm tests to be run with long socket path
Socket path is restricted to ~100 bytes, so we can use
the system temp dir if the path ends up too long.
Remi Collet [Thu, 2 Apr 2020 12:58:13 +0000 (14:58 +0200)]
news / UPGRADING for zip 1.19.0
Remi Collet [Thu, 2 Apr 2020 12:40:05 +0000 (14:40 +0200)]
- add ZipArchive::EM_UNKNOWN constant - add ZipArchive::EM_TRAD_PKWARE constant - cleanup hack for libzip 1.3.1 (have only exist for a few days) - add ZipArchive::isCompressionMethodSupported() method (libzip 1.7.0) - add ZipArchive::isEncryptionMethodSupported() method (libzip 1.7.0) - bump version to 1.19.0-dev
Christoph M. Becker [Thu, 2 Apr 2020 11:06:19 +0000 (13:06 +0200)]
Fix #47983: mixed LF and CRLF line endings in mail()
Email headers are supposed to be separated with CRLF. Period.
Christoph M. Becker [Thu, 2 Apr 2020 10:50:38 +0000 (12:50 +0200)]
Prevent imap mail tests from borking instead of skipping
As of commit
e49593a [1], run-tests.php is rather picky regarding the
output of SKIPIF sections, so we have to suppress warnings for failing
imap_open().
[1] <http://git.php.net/?p=php-src.git;a=commit;h=
e49593a7c3159a5673ce74b4e5133f1264dc313f >
Remi Collet [Thu, 2 Apr 2020 10:26:34 +0000 (12:26 +0200)]
use a better setter for zip_error_t
Nikita Popov [Thu, 2 Apr 2020 09:25:41 +0000 (11:25 +0200)]
Remove <default> prefix from reflection dump
This really doesn't add anything, and only makes for confusing
terminology. Only marking properties as dynamic is sufficient.
Nikita Popov [Thu, 2 Apr 2020 09:21:48 +0000 (11:21 +0200)]
Display property default value in reflection dumps
Nikita Popov [Thu, 2 Apr 2020 09:05:04 +0000 (11:05 +0200)]
Show property type in reflection export
Nikita Popov [Thu, 2 Apr 2020 08:54:32 +0000 (10:54 +0200)]
Avoid control flow warning
Christoph M. Becker [Wed, 1 Apr 2020 17:21:46 +0000 (19:21 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Enable error diagnostic for check_default_conf_path.phpt
Christoph M. Becker [Wed, 1 Apr 2020 17:20:35 +0000 (19:20 +0200)]
Enable error diagnostic for check_default_conf_path.phpt
Otherwise we have no clue why the test failed, if the regex didn't
match.
Nikita Popov [Wed, 1 Apr 2020 12:49:52 +0000 (14:49 +0200)]
Remove unnecessary check in runtime_compile_time_binary_operands.phpt
Now that operator errors are detected more accurately, we no longer
have any cases where we throw a compile-time error instead of a
run-time exception, so we can drop this check now.
Nikita Popov [Wed, 1 Apr 2020 12:47:21 +0000 (14:47 +0200)]
Make division by zero error check more accurate
For division (rather than modulus) we should check the double
value, otherwise the result might be zero after integer truncation,
but not zero as a floating point value.
Nikita Popov [Wed, 1 Apr 2020 11:02:58 +0000 (13:02 +0200)]
Unify checks for binary operator errors for ct eval
Move everything into one function and share it with opcache.
This fixes some discrepancies.
Nikita Popov [Wed, 1 Apr 2020 12:35:01 +0000 (14:35 +0200)]
Don't convert binop operand types in opcache
This may produce different behavior if operator overloading is
involved, and may change the error message.
If there's strong interest, this could be done in the DFA pass
with available type information. It does not look particularly
practically useful to me though.
Nikita Popov [Wed, 1 Apr 2020 12:23:07 +0000 (14:23 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix literal compaction collision between string and double
Nikita Popov [Wed, 1 Apr 2020 12:21:59 +0000 (14:21 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix literal compaction collision between string and double
Nikita Popov [Wed, 1 Apr 2020 12:20:59 +0000 (14:20 +0200)]
Fix literal compaction collision between string and double
For the sake of simplicity I'm using a separate hashtable, rather
than trying to do hash perturabation on the double strings.
Nikita Popov [Wed, 1 Apr 2020 08:05:26 +0000 (10:05 +0200)]
Improve "unsupported operands" error
By mentioning the operand types. We can do that now, as the
original operand types now remain available.
Closes GH-5330.
Nikita Popov [Wed, 1 Apr 2020 08:15:03 +0000 (10:15 +0200)]
Remove op_func from TRY_BINARY_OP1 macro
And move the operator overloading helpers into zend_operators.c,
there's no reason for them to be in the header.
Christoph M. Becker [Wed, 1 Apr 2020 07:29:07 +0000 (09:29 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Add NEWS entryc [ci skip]
Christoph M. Becker [Wed, 1 Apr 2020 07:28:39 +0000 (09:28 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Add NEWS entryc [ci skip]
Christoph M. Becker [Wed, 1 Apr 2020 07:26:20 +0000 (09:26 +0200)]
Add NEWS entryc [ci skip]
George Peter Banyard [Wed, 1 Apr 2020 02:55:35 +0000 (04:55 +0200)]
Merge branch 'PHP-7.4'