]>
granicus.if.org Git - php/log
Nikita Popov [Fri, 19 Mar 2021 15:04:16 +0000 (16:04 +0100)]
Fix handling of unknown class in trait precedence list
Fixes oss-fuzz #31983.
Dmitry Stogov [Fri, 19 Mar 2021 13:57:42 +0000 (16:57 +0300)]
micro-optimization
Nikita Popov [Thu, 18 Mar 2021 09:56:02 +0000 (10:56 +0100)]
Install de_DE locale on azure
Nikita Popov [Thu, 18 Mar 2021 14:40:48 +0000 (15:40 +0100)]
Support prototypes in call graph
Even if we don't know the exact method being called, include it
in the call graph with the is_prototype flag. In particular, we
can still make use of return types from prototype methods, as
PHP 8 makes LSP violations a hard error.
Most other places are adjusted to skip calls with !is_prototype.
Maybe some of them would be fine, but ignoring them is conservative.
Dmitry Stogov [Fri, 19 Mar 2021 09:19:24 +0000 (12:19 +0300)]
XFAIL on WIN64 because of problem in libffi
Nikita Popov [Fri, 19 Mar 2021 09:04:56 +0000 (10:04 +0100)]
Add missing rc1/rcn to return type initialization
Nikita Popov [Thu, 18 Mar 2021 16:11:56 +0000 (17:11 +0100)]
Allow inferring narrowed return type
Even if an explicit return type is given, we might still infer
a more narrow one based on return statements. We shouldn't
pessimize this just because a type has been declared.
Nikita Popov [Thu, 18 Mar 2021 15:25:06 +0000 (16:25 +0100)]
Update one more use of NO_AUTOLOAD
Máté Kocsis [Thu, 18 Mar 2021 15:09:25 +0000 (16:09 +0100)]
Update mysqli stub hash
Christoph M. Becker [Thu, 18 Mar 2021 14:31:23 +0000 (15:31 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fix #80783: PDO ODBC truncates BLOB records at every 256th byte
Nikita Popov [Thu, 18 Mar 2021 14:25:40 +0000 (15:25 +0100)]
Update opt test
And fix a type in the fetch class flags dumping while here.
Christoph M. Becker [Thu, 18 Mar 2021 14:16:01 +0000 (15:16 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Fix #80783: PDO ODBC truncates BLOB records at every 256th byte
Nikita Popov [Thu, 18 Mar 2021 14:15:21 +0000 (15:15 +0100)]
Don't imply SILENT from NO_AUTOLOAD
We have separate flags for non-autoloading class fetches and
silent class fetches. There's no reason why NO_AUTOLOAD should
be special-cased to be implicitly silent.
Christoph M. Becker [Thu, 25 Feb 2021 13:38:42 +0000 (14:38 +0100)]
Fix #80783: PDO ODBC truncates BLOB records at every 256th byte
It is not guaranteed, that the driver inserts only a single NUL byte at
the end of the buffer. Apparently, there is no way to find out the
actual data length in the buffer after calling `SQLGetData()`, so we
adjust after the next `SQLGetData()` call.
We also prevent PDO::ODBC_ATTR_ASSUME_UTF8 from fetching garbage, by
fetching all chunks with the same C type.
Closes GH-6716.
Dmitry Stogov [Thu, 18 Mar 2021 13:16:29 +0000 (16:16 +0300)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Additional fix for bug #80847. On x86_64 part of structure may be passed in CPU registers.
Dmitry Stogov [Thu, 18 Mar 2021 13:13:42 +0000 (16:13 +0300)]
Additional fix for bug #80847.
On x86_64 part of structure may be passed in CPU registers.
Dmitry Stogov [Thu, 18 Mar 2021 11:36:46 +0000 (14:36 +0300)]
"zend-test" was renamed to "zend_test"
Nikita Popov [Thu, 18 Mar 2021 09:51:04 +0000 (10:51 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fix locale switch back to C in pcre
Nikita Popov [Thu, 18 Mar 2021 09:50:57 +0000 (10:50 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Fix locale switch back to C in pcre
Nikita Popov [Thu, 18 Mar 2021 09:48:43 +0000 (10:48 +0100)]
Fix locale switch back to C in pcre
The compile context is shared between patterns, so we need to set
the character tables unconditionally in case we switched from
a non-C locale to the C locale.
Nikita Popov [Thu, 18 Mar 2021 09:14:32 +0000 (10:14 +0100)]
Destroy constant values before object store
Now that constants can contain objects (currently only enums),
we should destroy them before we free the object store, otherwise
there will be false positive leak reports.
This doesn't affect the fast_shutdown sequence.
Dharman [Sat, 13 Mar 2021 17:34:33 +0000 (17:34 +0000)]
Deprecate OO style mysqli::get_client_info method
Deprecate passing connection object to mysqli_get_client_info()
Closes GH-6777.
Dmitry Stogov [Wed, 17 Mar 2021 20:00:22 +0000 (23:00 +0300)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fixed bug #80861 (erronous array key overflow in 2D array with JIT)
Dmitry Stogov [Wed, 17 Mar 2021 19:59:59 +0000 (22:59 +0300)]
Fixed bug #80861 (erronous array key overflow in 2D array with JIT)
Ilija Tovilo [Wed, 17 Mar 2021 18:15:35 +0000 (19:15 +0100)]
Add enums to UPGRADING [ci skip]
Ilija Tovilo [Wed, 10 Jun 2020 21:10:18 +0000 (23:10 +0200)]
Implement enums
RFC: https://wiki.php.net/rfc/enumerations
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
Closes GH-6489.
George Peter Banyard [Wed, 17 Mar 2021 11:50:54 +0000 (11:50 +0000)]
Use zend_string_equals() API instead of strcmp() in various places
Closes GH-6784
George Peter Banyard [Wed, 17 Mar 2021 11:55:54 +0000 (11:55 +0000)]
Use zend_string_equals() API instead of strcmp() in COM extension
George Peter Banyard [Wed, 17 Mar 2021 11:41:08 +0000 (11:41 +0000)]
Use zend_string_equals() API instead of strcmp() in Date extension
George Peter Banyard [Wed, 17 Mar 2021 11:32:02 +0000 (11:32 +0000)]
Use zend_string_equals() API instead of strcmp() in Filter extension
George Peter Banyard [Wed, 17 Mar 2021 11:26:22 +0000 (11:26 +0000)]
Use zend_string_equals() API instead of strcmp() in PGSQL extension
And tiny drive by refactor at the same time for more usages
George Peter Banyard [Wed, 17 Mar 2021 11:23:02 +0000 (11:23 +0000)]
Use zend_string_equals() API instead of strcmp() in SOAP extension
George Peter Banyard [Wed, 17 Mar 2021 11:22:49 +0000 (11:22 +0000)]
Use zend_string_equals() API instead of strcmp() in main.c
Nikita Popov [Wed, 17 Mar 2021 15:34:18 +0000 (16:34 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fix signed/unsigned warnings in PDO ODBC
Nikita Popov [Mon, 14 Dec 2020 09:02:25 +0000 (10:02 +0100)]
Fix signed/unsigned warnings in PDO ODBC
Add add skipif to test.
(cherry picked from commit
aa58db723221ec891d4432621003bfa55dc15edf )
Nikita Popov [Wed, 17 Mar 2021 14:53:33 +0000 (15:53 +0100)]
Use absolute paths in tokenizer_data_gen.php
To make it work with out-of-tree builds.
Christoph M. Becker [Wed, 17 Mar 2021 14:09:18 +0000 (15:09 +0100)]
Initalize return_value before use
Otherwise we likely segfault[1]. We fix the same issue for
PDO_Firebird as well.
[1] <https://ci.appveyor.com/project/php/php-src/builds/
38267250 /job/6y3ngn1k6ryxx6j3?fullLog=true#L9783>
Closes GH-6785.
Nikita Popov [Wed, 17 Mar 2021 14:09:26 +0000 (15:09 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
imagecolortransparent() cannot return null
Nikita Popov [Wed, 17 Mar 2021 14:09:06 +0000 (15:09 +0100)]
imagecolortransparent() cannot return null
Nikita Popov [Wed, 17 Mar 2021 14:06:46 +0000 (15:06 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Return bool from imageinterlace()
Nikita Popov [Wed, 17 Mar 2021 14:05:09 +0000 (15:05 +0100)]
Return bool from imageinterlace()
The function accepts a bool since PHP 8.0, so it should also return
a bool to keep things consistent.
Furthermore a null return from this functions is not possible.
Dmitry Stogov [Wed, 17 Mar 2021 13:55:42 +0000 (16:55 +0300)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fixed bug #80839 (PHP problem with JIT)
Dmitry Stogov [Wed, 17 Mar 2021 13:55:09 +0000 (16:55 +0300)]
Fixed bug #80839 (PHP problem with JIT)
Dmitry Stogov [Wed, 17 Mar 2021 12:50:36 +0000 (15:50 +0300)]
Fix CLANG/RELEASE build (this is a workaround for probable bug in CLANG)
Christoph M. Becker [Wed, 17 Mar 2021 11:40:40 +0000 (12:40 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fix #66783: UAF when appending DOMDocument to element
Christoph M. Becker [Wed, 17 Mar 2021 11:39:06 +0000 (12:39 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Fix #66783: UAF when appending DOMDocument to element
Christoph M. Becker [Mon, 15 Mar 2021 09:26:50 +0000 (10:26 +0100)]
Fix #66783: UAF when appending DOMDocument to element
According to the DOM standard, elements may only contain element, text,
processing instruction and comment nodes[1]. It is also specified that
a HierarchyRequestError should be thrown if a document is to be
inserted[2]. We follow that standard, and prevent the use-after-free
this way.
[1] <https://dom.spec.whatwg.org/#node-trees>
[2] <https://dom.spec.whatwg.org/#mutation-algorithms>
Closes GH-6765.
Nikita Popov [Wed, 17 Mar 2021 11:19:09 +0000 (12:19 +0100)]
Avoid unnecessary static_variables persistence
static_variables should be treated the same way as all other
op_array components nowadays (only static_variables_ptr is
special). There's no need to persist/serialize it is separately
per shared op_array.
Christoph M. Becker [Wed, 17 Mar 2021 11:15:35 +0000 (12:15 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
8.0.5 is next
Christoph M. Becker [Wed, 17 Mar 2021 11:12:01 +0000 (12:12 +0100)]
8.0.5 is next
We also move the NEWS entry for bug 80847 to the proper version.
Nikita Popov [Wed, 17 Mar 2021 10:51:23 +0000 (11:51 +0100)]
Simplify attribute persistence
For an inherited op_array, directly fetch the xlat entry, as we
do for everything else.
Nikita Popov [Wed, 17 Mar 2021 10:26:41 +0000 (11:26 +0100)]
Fix PDO test under libmysqlclient
Máté Kocsis [Wed, 17 Mar 2021 08:39:54 +0000 (09:39 +0100)]
Declare PDORow::queryString property
Relates GH-6742
Dmitry Stogov [Wed, 17 Mar 2021 06:56:07 +0000 (09:56 +0300)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fixed bug #80847 (CData structs with fields of type struct can't be passed as C function argument)
Dmitry Stogov [Wed, 17 Mar 2021 06:55:20 +0000 (09:55 +0300)]
Fixed bug #80847 (CData structs with fields of type struct can't be passed as C function argument)
George Peter Banyard [Mon, 15 Mar 2021 16:26:04 +0000 (16:26 +0000)]
Add API to fetch bool value for PDO attribute values
Closes GH-6766
George Peter Banyard [Mon, 15 Mar 2021 15:30:58 +0000 (15:30 +0000)]
Use standard PDO way for fetching integer attribute values
George Peter Banyard [Fri, 12 Mar 2021 20:41:15 +0000 (20:41 +0000)]
Validate string is numeric for integer PDO attribute value
Máté Kocsis [Tue, 16 Mar 2021 16:24:30 +0000 (17:24 +0100)]
Promote DOM invalid state errors during property access
Closes GH-6780
Dmitry Stogov [Tue, 16 Mar 2021 17:31:36 +0000 (20:31 +0300)]
Change Zend Stream API to use zend_string* instead of char*.
This allows to eliminate re-calculation of string lenght and hash value.
See the detailed list of changes in UPGRADING.INTERNALS.
Ilija Tovilo [Tue, 5 Jan 2021 22:06:11 +0000 (23:06 +0100)]
Add tokenizer_data_gen to build process
Closes GH-6723.
Nikita Popov [Tue, 16 Mar 2021 13:30:24 +0000 (14:30 +0100)]
Don't check executability
As $(PHP) is not an absolute path, test -x doesn't do anything
meaningful. Rely on the autoconf check.
Nikita Popov [Tue, 16 Mar 2021 13:24:48 +0000 (14:24 +0100)]
Check for WRONG_PROPERTY_INFO
Nikita Popov [Tue, 16 Mar 2021 13:21:38 +0000 (14:21 +0100)]
Revert "Remove some unnecessary explicit header dependencies"
This reverts commit
c386b1fb177ec0dccc840cbec801e69609ced5c3 .
It looks like at least some of these might be needed for ordering
in a clean build?
Nikita Popov [Tue, 16 Mar 2021 12:08:37 +0000 (13:08 +0100)]
Automatically run zend_vm_gen.php if zend_vm_def.h changes
Nikita Popov [Tue, 16 Mar 2021 12:02:23 +0000 (13:02 +0100)]
Remove some unnecessary explicit header dependencies
These are now automatically tracked by the build system.
Nikita Popov [Tue, 16 Mar 2021 11:28:47 +0000 (12:28 +0100)]
Check for php program in autoconf
Use the detected PHP (minimum 7.1) to run gen_stubs, and other
code generation scripts in the future.
Max Semenik [Wed, 10 Feb 2021 12:17:03 +0000 (15:17 +0300)]
run-tests.php: class for test file loading
This moves a bunch of code outside of run_tests(), making it a bit
more manageable. Additionally, accessors provide better readability
than isset() and friends.
This is a minimal patch that moves the code but does not refactor
much. For the sake of reviewing experience, it does not involve
further refactoring which could include:
* Removing setSection()
* Fixing up the mess with hasSection() vs. sectionNotEmpty(), only
one of which is really needed.
* Moving more repetitive code into the new class.
All of this will be done with later commits.
Closes GH-6678.
Nikita Popov [Tue, 16 Mar 2021 10:18:12 +0000 (11:18 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fix refcount inference for typed properties
Nikita Popov [Tue, 16 Mar 2021 10:15:48 +0000 (11:15 +0100)]
Fix refcount inference for typed properties
We were not adding RC1/RCN if the MAY_BE_OBJECT came from a class
type and there was no other refcounted type in the union.
Nikita Popov [Tue, 16 Mar 2021 09:38:04 +0000 (10:38 +0100)]
Add sanity check for type of read_property return value
If an internal class overrides read_property and declared property
types, make sure that the returned value matches the declared
type (in debug builds).
Derick Rethans [Tue, 16 Mar 2021 09:41:47 +0000 (09:41 +0000)]
Merge branch 'PHP-8.0'
Derick Rethans [Tue, 16 Mar 2021 09:41:40 +0000 (09:41 +0000)]
Merge branch 'PHP-7.4' into PHP-8.0
Derick Rethans [Tue, 16 Mar 2021 09:41:21 +0000 (09:41 +0000)]
Fix build version too
Derick Rethans [Tue, 16 Mar 2021 09:40:32 +0000 (09:40 +0000)]
Merge branch 'PHP-8.0'
Derick Rethans [Tue, 16 Mar 2021 09:40:21 +0000 (09:40 +0000)]
Merge branch 'PHP-7.4' into PHP-8.0
Derick Rethans [Tue, 16 Mar 2021 09:40:05 +0000 (09:40 +0000)]
NEWS for 7.4.18
Derick Rethans [Tue, 16 Mar 2021 09:33:33 +0000 (09:33 +0000)]
Prepare for 7.4.17RC1
Máté Kocsis [Tue, 16 Mar 2021 08:34:04 +0000 (09:34 +0100)]
Merge branch 'PHP-8.0'
* Fix crash in LDAP search functions during argument validation
* Fix ldap_next_entry() parameter name
Máté Kocsis [Mon, 15 Mar 2021 22:07:27 +0000 (23:07 +0100)]
Fix ldap_next_entry() parameter name
Máté Kocsis [Mon, 15 Mar 2021 22:07:05 +0000 (23:07 +0100)]
Fix crash in LDAP search functions during argument validation
Máté Kocsis [Mon, 15 Mar 2021 22:47:58 +0000 (23:47 +0100)]
Merge branch 'PHP-8.0'
Máté Kocsis [Mon, 15 Mar 2021 22:45:37 +0000 (23:45 +0100)]
Add missing skipif sections to ext/dom tests
Christoph M. Becker [Mon, 15 Mar 2021 17:40:30 +0000 (18:40 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fix #80817: dba_popen() may cause segfault during RSHUTDOWN
Christoph M. Becker [Mon, 15 Mar 2021 17:39:11 +0000 (18:39 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Fix #80817: dba_popen() may cause segfault during RSHUTDOWN
Christoph M. Becker [Mon, 1 Mar 2021 17:14:26 +0000 (18:14 +0100)]
Fix #80817: dba_popen() may cause segfault during RSHUTDOWN
We need to close persistent streams with the proper flag.
George Peter Banyard [Fri, 12 Mar 2021 21:02:15 +0000 (21:02 +0000)]
Add comment explaining empty default case
George Peter Banyard [Fri, 12 Mar 2021 20:24:31 +0000 (20:24 +0000)]
Boolify pdo_dbh_attribute_set()
George Peter Banyard [Fri, 12 Mar 2021 03:11:31 +0000 (03:11 +0000)]
Boolify pdo_hash_methods()
George Peter Banyard [Fri, 12 Mar 2021 03:05:04 +0000 (03:05 +0000)]
Boolify pdo_stmt_describe_columns()
George Peter Banyard [Fri, 12 Mar 2021 02:57:46 +0000 (02:57 +0000)]
Voidify internal pdo_sqlstate_init_error_table()
This always returned SUCCESS
George Peter Banyard [Fri, 12 Mar 2021 02:27:18 +0000 (02:27 +0000)]
Remove php_pdo_str_tolower_dup() function
Dharman [Wed, 20 Jan 2021 22:50:55 +0000 (22:50 +0000)]
Change the default error mode of mysqli
Make MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT the new mysqli
error reporting default. Explicitly call
mysqli_report(MYSQLI_REPORT_OFF) to preserve previous behavior.
RFC: https://wiki.php.net/rfc/mysqli_default_errmode
Closes GH-6629.
Nikita Popov [Mon, 15 Mar 2021 13:48:09 +0000 (14:48 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fix bug #80866
Nikita Popov [Mon, 15 Mar 2021 13:47:50 +0000 (14:47 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Fix bug #80866
Dharman [Mon, 15 Mar 2021 12:21:44 +0000 (12:21 +0000)]
Fix bug #80866
Closes GH-6774.
Nikita Popov [Mon, 15 Mar 2021 13:38:56 +0000 (14:38 +0100)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fix bug #80837
Nikita Popov [Mon, 15 Mar 2021 13:38:22 +0000 (14:38 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Fix bug #80837
Dharman [Fri, 5 Mar 2021 21:45:27 +0000 (21:45 +0000)]
Fix bug #80837
The error needs to be reported on the statement, not the connection.
Nikita Popov [Mon, 15 Mar 2021 13:22:49 +0000 (14:22 +0100)]
Assert that stmt is set in PDORow