]>
granicus.if.org Git - php/log
Máté Kocsis [Wed, 19 Aug 2020 20:35:22 +0000 (22:35 +0200)]
Promote warnings to exceptions in ext/xmlreader
Closes GH-6021
Nikita Popov [Tue, 25 Aug 2020 09:27:58 +0000 (11:27 +0200)]
Don't return temporary from SXE write_property handler
Return the original value. If we don't return the original value,
we need to own the zval, which we don't.
For clarity also switch things to work on a zend_string* value
instead of a zval*.
Nikita Popov [Tue, 25 Aug 2020 09:01:22 +0000 (11:01 +0200)]
Simplify change_node_zval implementation
At this point, the value has already been converted into a string.
Dmitry Stogov [Tue, 25 Aug 2020 08:37:30 +0000 (11:37 +0300)]
Move AVOID_REFCOUNTING type info flag into a separate bit
Christoph M. Becker [Mon, 24 Aug 2020 15:38:50 +0000 (17:38 +0200)]
Merge branch 'PHP-7.4' into master
* PHP-7.4:
Fix potential integer overflow detected by oss-fuzz
Máté Kocsis [Wed, 19 Aug 2020 20:43:07 +0000 (22:43 +0200)]
Promote warning to exception in ext/enchant
Closes GH-6022
Christoph M. Becker [Mon, 24 Aug 2020 15:36:50 +0000 (17:36 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix potential integer overflow detected by oss-fuzz
Christoph M. Becker [Mon, 24 Aug 2020 15:32:06 +0000 (17:32 +0200)]
Fix potential integer overflow detected by oss-fuzz
We port the respective fix from upstream[1].
[1] <https://github.com/libgd/libgd/commit/
9ed642764cf0b4585d135eb738812a43265cb2d3 >
Máté Kocsis [Tue, 18 Aug 2020 12:24:46 +0000 (14:24 +0200)]
Promote warning to exception in ext/posix
Closes GH-6009
Máté Kocsis [Mon, 10 Aug 2020 17:06:55 +0000 (19:06 +0200)]
Promote warnings to exceptions in ext/filter
Closes GH-5970
Nikita Popov [Mon, 24 Aug 2020 15:30:31 +0000 (17:30 +0200)]
Drop a spurious zend_string_release
This should have been dropped in the refactoring.
Nikita Popov [Mon, 24 Aug 2020 15:09:33 +0000 (17:09 +0200)]
Clean up setlocale implementation
Factor out the core logic into a separate function and drop the
"clever" code that combines iteration through variadic arguments
and arrays.
This fixes bug #79829 as a side effect.
Nikita Popov [Mon, 24 Aug 2020 14:49:37 +0000 (16:49 +0200)]
Remove php_my_setlocale workaround
This works around a macro-expansion issue that is no longer
relevant in PHP 8.
Nikita Popov [Mon, 24 Aug 2020 14:30:49 +0000 (16:30 +0200)]
Fix refcounting for the named params case as well
Adjust the test case to pass a refcounted value and to also check
the named params case.
Nikita Popov [Mon, 24 Aug 2020 14:23:33 +0000 (16:23 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix refcounting
Nikita Popov [Mon, 24 Aug 2020 14:23:19 +0000 (16:23 +0200)]
Fix refcounting
Tyson Andre [Sun, 23 Aug 2020 14:46:40 +0000 (10:46 -0400)]
Check for duplicate names in gen_stub.php
With named arguments in php 8.0, it's important that php's modules
or PECL extensions using gen_stub.php don't generate functions
with duplicate names.
Warn if a parameter name is repeated,
even if the last occurrence is a variadic parameter
Closes GH-6035
Christoph M. Becker [Mon, 24 Aug 2020 13:02:15 +0000 (15:02 +0200)]
Merge branch 'PHP-7.4' into master
* PHP-7.4:
Fix #79979: passing value to by-ref param via CUFA crashes
Christoph M. Becker [Mon, 24 Aug 2020 09:47:31 +0000 (11:47 +0200)]
Fix #79979: passing value to by-ref param via CUFA crashes
If a by-val send is not allowed, we must not do so. Instead we wrap
the value in a temporary reference.
Closes GH-6000
Berbe [Wed, 19 Aug 2020 00:44:53 +0000 (02:44 +0200)]
Fix: Gracefully handle empty user input in run-tests.php
Closes GH-6016.
David Carlier [Sun, 16 Aug 2020 17:30:24 +0000 (17:30 +0000)]
further network libraries detection for Haiku system.
Closes GH-5997.
Christoph M. Becker [Mon, 24 Aug 2020 09:10:09 +0000 (11:10 +0200)]
Merge branch 'PHP-7.4' into master
* PHP-7.4:
Fix #79986: str_ireplace bug with diacritics characters
Christoph M. Becker [Mon, 24 Aug 2020 09:09:21 +0000 (11:09 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #79986: str_ireplace bug with diacritics characters
Christoph M. Becker [Tue, 18 Aug 2020 11:24:17 +0000 (13:24 +0200)]
Fix #79986: str_ireplace bug with diacritics characters
`tolower()` returns an `int`, so we must not convert to `char` which
may be `signed` and as such may be subject to overflow (actually,
implementation defined behavior).
Closes GH-6007
Christoph M. Becker [Mon, 24 Aug 2020 09:04:27 +0000 (11:04 +0200)]
Merge branch 'PHP-7.4' into master
* PHP-7.4:
Fix #80002: calc free space for new interned string is wrong
Christoph M. Becker [Mon, 24 Aug 2020 09:03:42 +0000 (11:03 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #80002: calc free space for new interned string is wrong
Christoph M. Becker [Thu, 20 Aug 2020 09:20:03 +0000 (11:20 +0200)]
Fix #80002: calc free space for new interned string is wrong
We need to calculate the free size in bytes.
Patch contributed by t-matsuno.
Closes GH-6024
Nikita Popov [Mon, 24 Aug 2020 08:15:57 +0000 (10:15 +0200)]
Check variadic parameter for type and duplicate name
Set HAS_TYPE_HINTS flag if the variadic parameter is types as well,
and make sure it has a distinct name. This was previously missed,
because the variadic parameter is not part of num_args.
Kees Cook [Sun, 23 Aug 2020 15:39:53 +0000 (08:39 -0700)]
sapi/fpm/config.m4: check for libapparmor's aa_change_profile()
The fpm code actually uses aa_change_profile(), not change_hat(). Test
for the correct function. (libapparmor always has both, so this is just
a correctness fix.)
Closes GH-6037.
Dmitry Stogov [Mon, 24 Aug 2020 06:50:54 +0000 (09:50 +0300)]
Máté Kocsis [Sun, 23 Aug 2020 19:17:05 +0000 (21:17 +0200)]
Remove custom hacks from gen_stub.php after PHP-Parser upgrade
Tyson Andre [Sun, 23 Aug 2020 15:12:44 +0000 (11:12 -0400)]
Update PHP-Parser from 4.3.0 to 4.9.0
PHP-Parser 4.3.0 failed to recognize that the `match` keyword could be
used as a class constant name.
4.9.0 also adds support for keywords in namespaced names.
See https://github.com/nikic/PHP-Parser/releases
So forcing regeneration of spl_iterators.stub.php failed.
PECL extensions using gen_stub.php would also be affected
by the same issue.
```
ext/spl/spl_iterators.stub.php
public function __construct(Iterator $iterator, string $regex,
int $mode = self::MATCH, int $flags = 0, int $preg_flags = 0) {}
```
Testing: I successfully regenerated stubs by setting forceRegeneration to true
and running `touch **/*.stub.php; make`.
The stubs did not change, as expected.
Closes GH-6036
Christoph M. Becker [Thu, 6 Aug 2020 16:57:18 +0000 (18:57 +0200)]
Fix #55847: DOTNET .NET 4.0 GAC new location
If we do not specify the exact version of the .NET framework to use,
the default CLR is loaded, which is typically CLR 2, which is very old.
Therefore, we introduce a `PHP_INI_SYSTEM` setting, which allows users
to choose the desired .NET framework version. The value of the setting
are the first three parts of the framework's version number, separated
by dots, and prefixed with "v", e.g. "v4.0.30319". If the value of the
INI setting is `NULL` (the default) or an empty string, the default CLR
is used.
Internally, we switch from the most generic `CoCreateInstance()` to
`CorBindToRuntime()` which is implemented in mscoree.dll. To avoid the
hard dependency to that library, we load dynamically.
So this fix is supposed to be fully backwards compatible.
Closes GH-5949
Christoph M. Becker [Sat, 22 Aug 2020 10:33:35 +0000 (12:33 +0200)]
Merge branch 'PHP-7.4' into master
* PHP-7.4:
Fix #80007: Potential type confusion in unixtojd() parameter parsing
Christoph M. Becker [Sat, 22 Aug 2020 10:30:33 +0000 (12:30 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #80007: Potential type confusion in unixtojd() parameter parsing
Andy Postnikov [Fri, 21 Aug 2020 23:44:48 +0000 (02:44 +0300)]
Fix #80007: Potential type confusion in unixtojd() parameter parsing
Also it fixes test on 32-bit armv7 and x86
- Test unixtojd() function : error conditions [ext/calendar/tests/unixtojd_error1.phpt]
Closes GH-6033
Christopher Jones [Sat, 22 Aug 2020 01:37:23 +0000 (11:37 +1000)]
Squash a Linux compile warning
David Carlier [Thu, 13 Aug 2020 09:40:24 +0000 (09:40 +0000)]
fileinfo build fix proposal for haiku.
Haiku already defines a unichar type and different than the fileinfo's anyway.
Closed GH-5983
Christoph M. Becker [Fri, 21 Aug 2020 13:46:30 +0000 (15:46 +0200)]
Merge branch 'PHP-7.4' into master
* PHP-7.4:
sqlite3 linkage issue on some systems/package combination fix.
David Carlier [Sat, 15 Aug 2020 13:11:51 +0000 (14:11 +0100)]
sqlite3 linkage issue on some systems/package combination fix.
Checking the version is not enough, the function might be available
but the symbols are not present still.
Closes GH-5993
Christoph M. Becker [Fri, 21 Aug 2020 13:30:07 +0000 (15:30 +0200)]
Merge branch 'PHP-7.4' into master
* PHP-7.4:
Fix wrong datatype
Christoph M. Becker [Fri, 21 Aug 2020 13:28:37 +0000 (15:28 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix wrong datatype
Manuel Mausz [Fri, 21 Aug 2020 11:53:40 +0000 (11:53 +0000)]
Fix wrong datatype
ini_entry->modifiable is of type uint8_t and so should be the temp. variable. Especially important after
4b77a158 .
Closes GH-6028
Remi Collet [Fri, 21 Aug 2020 12:41:35 +0000 (14:41 +0200)]
ensure installed ini don't interfere
Christopher Jones [Fri, 21 Aug 2020 07:46:16 +0000 (17:46 +1000)]
OCI8 classes were already renamed in 8; this now follows the new-new standard
Dmitry Stogov [Fri, 21 Aug 2020 06:50:28 +0000 (09:50 +0300)]
Better register usage for ASSIGN_DIM_OP
Dmitry Stogov [Thu, 20 Aug 2020 22:57:03 +0000 (01:57 +0300)]
Better registers usage
Dmitry Stogov [Thu, 20 Aug 2020 17:43:40 +0000 (20:43 +0300)]
cleanup unused parameters
Dmitry Stogov [Thu, 20 Aug 2020 17:39:13 +0000 (20:39 +0300)]
efree() doesn't use line number arguments (pass zeros)
Dmitry Stogov [Thu, 20 Aug 2020 12:02:12 +0000 (15:02 +0300)]
micro-optimization
Máté Kocsis [Wed, 19 Aug 2020 21:27:53 +0000 (23:27 +0200)]
Promote warnings to exceptions in ext/gd
Closes GH-6023
Dmitry Stogov [Wed, 19 Aug 2020 14:51:23 +0000 (17:51 +0300)]
Load zval type into register to eliminate double load
Dmitry Stogov [Wed, 19 Aug 2020 11:53:01 +0000 (14:53 +0300)]
Shrink live intervals of IS_VAR/IS_TMP_VAR
Dmitry Stogov [Wed, 19 Aug 2020 11:51:39 +0000 (14:51 +0300)]
Fixed tracing JIT crash in case SSA for op_array is not provided
Benjamin Eberlei [Wed, 19 Aug 2020 10:20:11 +0000 (12:20 +0200)]
Update NEWS w.r.t to bugfix #79968
Benjamin Eberlei [Sat, 15 Aug 2020 08:52:04 +0000 (10:52 +0200)]
Fix #79968: Manipulation on unattached DOMChildNode should throw DOMException
Dmitry Stogov [Wed, 19 Aug 2020 06:30:08 +0000 (09:30 +0300)]
Fixed memory leak (ext/hash/tests/mhash_001.phpt failure)
Tyson Andre [Tue, 18 Aug 2020 23:17:03 +0000 (19:17 -0400)]
Fix more basic function stubs
User-defined functions can't have multiple parameters with the same name.
Don't do that for var_dump/debug_zval_dump.
Consistently use array $array to match docs
Fix typo in UPGRADING
Fixes GH-6015
Dmitry Stogov [Tue, 18 Aug 2020 18:13:18 +0000 (21:13 +0300)]
Check for exception after $this destruction
Dmitry Stogov [Tue, 18 Aug 2020 18:10:34 +0000 (21:10 +0300)]
Fixed register allocation for CASE instruction. CASE don't destroy first operand and it may be used later in VM or different trace.
Máté Kocsis [Tue, 18 Aug 2020 12:29:30 +0000 (14:29 +0200)]
Promote warnings to exceptions in ext/pspell
Closes GH-6010
Matteo Beccati [Tue, 18 Aug 2020 16:31:11 +0000 (18:31 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix #47021: SoapClient stumbles over WSDL delivered with "Transfer-Encoding: chunked"
Matteo Beccati [Tue, 18 Aug 2020 16:27:26 +0000 (18:27 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #47021: SoapClient stumbles over WSDL delivered with "Transfer-Encoding: chunked"
Matteo Beccati [Tue, 18 Aug 2020 16:10:39 +0000 (18:10 +0200)]
Fix #47021: SoapClient stumbles over WSDL delivered with "Transfer-Encoding: chunked"
Sara Golemon [Tue, 18 Aug 2020 14:03:56 +0000 (14:03 +0000)]
Update NEWS for 8.0.0beta3
Sara Golemon [Tue, 18 Aug 2020 13:44:29 +0000 (13:44 +0000)]
Update NEWS for PHP 8.0.0beta2
Christoph M. Becker [Tue, 18 Aug 2020 10:39:18 +0000 (12:39 +0200)]
Fix #79988: new reserved keyword `match` is a backward incompatible change
Dmitry Stogov [Tue, 18 Aug 2020 10:13:58 +0000 (13:13 +0300)]
Don't add guard for empty()
Dmitry Stogov [Tue, 18 Aug 2020 08:08:04 +0000 (11:08 +0300)]
Fixed bug #79987 (Memory leak in SplFileInfo because of missing zend_restore_error_handling())
Christoph M. Becker [Tue, 18 Aug 2020 08:03:17 +0000 (10:03 +0200)]
Merge branch 'PHP-7.4' into master
* PHP-7.4:
7.3.23 is next
Christoph M. Becker [Tue, 18 Aug 2020 08:00:46 +0000 (10:00 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
7.3.23 is next
Christoph M. Becker [Tue, 18 Aug 2020 07:55:37 +0000 (09:55 +0200)]
7.3.23 is next
Derick Rethans [Tue, 18 Aug 2020 07:06:35 +0000 (08:06 +0100)]
Merge branch 'PHP-7.4' into master
Derick Rethans [Tue, 18 Aug 2020 07:06:20 +0000 (08:06 +0100)]
Prepare for 7.4.11
Christoph M. Becker [Tue, 18 Aug 2020 06:37:36 +0000 (08:37 +0200)]
Merge branch 'PHP-7.4' into master
* PHP-7.4:
Fix HTTP response status code
Christoph M. Becker [Tue, 18 Aug 2020 06:35:56 +0000 (08:35 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix HTTP response status code
Christoph M. Becker [Mon, 17 Aug 2020 16:36:02 +0000 (18:36 +0200)]
Fix HTTP response status code
Dmitry Stogov [Tue, 18 Aug 2020 06:28:13 +0000 (09:28 +0300)]
JIT extension may be NULL
Dmitry Stogov [Mon, 17 Aug 2020 21:12:05 +0000 (00:12 +0300)]
Fixed support for named arguments
Dmitry Stogov [Mon, 17 Aug 2020 19:55:25 +0000 (22:55 +0300)]
Fixed trace type inference for FE_FETCH_R/RW
Dmitry Stogov [Mon, 17 Aug 2020 19:31:03 +0000 (22:31 +0300)]
Fixed support for possible indirect variable modification (ext/standard/tests/array/bug77135.phpt failure).
Dmitry Stogov [Mon, 17 Aug 2020 17:48:48 +0000 (20:48 +0300)]
JIT for ZEND_ISSET_ISEMPTY_CV
Dmitry Stogov [Mon, 17 Aug 2020 17:47:06 +0000 (20:47 +0300)]
Fixed JIT for indirectly recursive traces
George Peter Banyard [Wed, 8 Jul 2020 13:51:28 +0000 (15:51 +0200)]
Promote warnings in ext/zip
Dmitry Stogov [Mon, 17 Aug 2020 12:24:33 +0000 (15:24 +0300)]
Removed outdated/duplicated code
Dmitry Stogov [Mon, 17 Aug 2020 10:50:03 +0000 (13:50 +0300)]
Properly patch jmp tables
George Peter Banyard [Sun, 16 Aug 2020 16:59:52 +0000 (18:59 +0200)]
Promote various OpenSSL warnings into Errors
Closes GH-5111
Tyson Andre [Mon, 10 Aug 2020 02:07:33 +0000 (22:07 -0400)]
Add `run-tests.php --context [n]` option.
Mentioned in https://github.com/php/php-src/pull/5965#discussion_r467621123
This PR proposes 3 lines of context so the impact can be seen in tests.
Other `diff` programs show around 3 lines of context.
(This helps indicate exactly which position a test should be updated
to add a new expected line at)
Use the mapping for choosing order to display diffs
Properly include context in cases where the expected output had more lines than
the actual output, e.g.
```
--FILE--
A
A1
A
C
NEARBY
--EXPECTF--
A
B
A1
B
A
B
A
B
NEARBY
```
Closes GH-5968
Máté Kocsis [Sun, 9 Aug 2020 09:05:26 +0000 (11:05 +0200)]
Promote warnings to exceptions in ext/curl
Closes GH-5963
Nikita Popov [Fri, 14 Aug 2020 13:52:31 +0000 (15:52 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Null terminate the sodium_crypto_kx_keypair() result
Nikita Popov [Fri, 14 Aug 2020 13:52:15 +0000 (15:52 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Null terminate the sodium_crypto_kx_keypair() result
Nikita Popov [Fri, 14 Aug 2020 13:51:00 +0000 (15:51 +0200)]
Null terminate the sodium_crypto_kx_keypair() result
Nikita Popov [Fri, 14 Aug 2020 13:37:48 +0000 (15:37 +0200)]
Reduce cost factors in sodium password_hash tests
Drop the 4x factors to make these tests a bit less obscenely
slow.
Christoph M. Becker [Fri, 14 Aug 2020 13:33:02 +0000 (15:33 +0200)]
Improve test portability
We have to ensure that the attempted connection to the MySQL server
fails, and do that by passing an unknown host instead of falling back
to localhost.
Nikita Popov [Fri, 14 Aug 2020 13:17:52 +0000 (15:17 +0200)]
Avoid fatal error in session handler
Nikita Popov [Fri, 14 Aug 2020 13:07:55 +0000 (15:07 +0200)]
Use variadic signature for PDOStatement::fetchAll()
The current signature is incorrect, because the $ctor_args parameter
is not required to be an array (it can at least also be null, and
isn't enforced by an exception anyway).
I'm going for the variadic signature here, because we already use
the same variadic signature in PDO::query() and
PDOStatement::setFetchMode(), all of them accepting essentially the
same arguments.
Nikita Popov [Fri, 14 Aug 2020 12:42:54 +0000 (14:42 +0200)]
Fix types in openssl stub
These two $recipcert parameters don't use proper union types
right now. They are a bit tricky due to the $recipkey -> $recipcert
fallback.
Christoph M. Becker [Fri, 14 Aug 2020 12:34:24 +0000 (14:34 +0200)]
Fix newly introduced test for Windows
The warning message is rather different there, but since that is
irrelevant for this test case, we just suppress the warning.
Máté Kocsis [Fri, 14 Aug 2020 09:59:25 +0000 (11:59 +0200)]
Add a few callable method parameter types to ext/sqlite3
Closes GH-5988
Nikita Popov [Fri, 14 Aug 2020 10:44:13 +0000 (12:44 +0200)]
Don't assert mysql->mysql is non-null
There is an edge case in constructor behavior where we can end up
with mysql->mysql being NULL (rather than mysql itself already being
NULL). I think that ultimately that's a bug in the constructor code,
and we should probably be destroying the outer structure on
construction failure as well. However it's pretty hard to unravel
with when considering all the construction permutations.