Skip to content
forked from php/php-src

sync #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 268 commits into from
Jun 15, 2023
Merged

sync #22

merged 268 commits into from
Jun 15, 2023

Conversation

chopins
Copy link
Owner

@chopins chopins commented Jun 15, 2023

No description provided.

nielsdos and others added 30 commits May 7, 2023 17:33
* PHP-8.1:
  Fix GH-11180: hash_file() appears to be restricted to 3 arguments
* PHP-8.2:
  Fix GH-11180: hash_file() appears to be restricted to 3 arguments
resource would stay uninitialized if the first call to zend_parse_parameters
fails, but the value is still passed to phar_add_file(). It's not used there if
cont_str is provided and so didn't cause any issues.

Closes GH-11202
* PHP-8.1:
  Fix use-of-uninitialized value in phar_object.c
* PHP-8.2:
  Fix use-of-uninitialized value in phar_object.c
ex->call is only set for user calls, we shouldn't access it here.
zend_unfinished_execution_gc_ex wouldn't actually use it for internal calls, so
it didn't cause any serious issues.

Closes GH-11208
* PHP-8.2:
  Fix use-of-undefined in zend_fiber_object_gc of ex->call
ecalloc already zeroes the structure, so writing NULL is not necessary.
If you build soap as a shared object, then these tests fail on
non-Windows, or when the PHP install hasn't been make install-ed yet,
but is executed from the development directory.

Closes GH-11211.
* PHP-8.1:
  Fix GH-8426: make test fail while soap extension build
* PHP-8.2:
  Fix GH-8426: make test fail while soap extension build
In older versions of GCC (<=4.5) designated initializers would not accept member
names nested inside anonymous structures. Instead, we need to use a positional
member wrapped in {}.

Fixes GH-11063
Closes GH-11212
* PHP-8.1:
  Fix compilation error on old GCC versions
* PHP-8.2:
  Fix compilation error on old GCC versions
Accidentally introduced in 175ff60. arData was
not part of an anonymous union.
* PHP-8.1:
  Fix compilation for PHP 8.1
* PHP-8.2:
  Fix compilation for PHP 8.1
* PHP-8.1:
  [skip ci] Remove NEWS entry for reverted change in PHP 8.1
* PHP-8.2:
  [skip ci] Remove NEWS entry for reverted change in PHP 8.1
* PHP-8.2:
  [skip ci] Add missing --no-progress flag to ARM build
nielsdos and others added 29 commits June 8, 2023 17:44
… assumption

* Use a prepending strategy instead of appending in dom_set_old_ns()

Looping to the end of the list is wasteful. We can just put the new
nodes at the front of the list. I don't believe we can fully prepend,
because libxml2 may assume that the xml namespace is the first one, so
we'll put the new ones as the second one.

* Reuse namespaces from doc->oldNs if possible in dom_get_ns()

* Add a test for reconciling a reused namespace

* Explain why there can't be a cycle between oldNs and nsDef

Closes GH-11376.

Also fixes #77894.
Depending on the order in which observers were installed, some observers might have been executed twice after removal of another observer. Also, adding an observer could produce a bogus pointer.
IPv6 addresses are valid entries in subjectAltNames. Certificate
Authorities may issue certificates including IPv6 addresses except
if they fall within addresses in the RFC 4193 range. Google and
CloudFlare provide IPv6 addresses in their DNS over HTTPS services.

Internal CAs do not have those restrictions and can issue Unique
local addresses in certificates.

Closes GH-11145
* Fix type confusion and parent reference
* Manually manage the lifetime of the parent
* Add regression tests
* Break out to a helper, and apply the use-after-free fix to xpath

Closes GH-11402.
* PHP-8.1:
  Fix #70359 and #78577: segfaults with DOMNameSpaceNode
* PHP-8.2:
  Fix #70359 and #78577: segfaults with DOMNameSpaceNode
This adds support for the completed event. Since the read handler could
be entered twice towards the end of the stream we remember what the eof
flag was before reading so we can emit the completed event when the flag
changes to true.

Closes GH-10505.
This is an alternative implementation for GH-10406 that resets the
has_buffered_data flag after finishing stream read so it does not impact
other ops->read use like for example php_stream_get_line.

Closes GH-11421
It's the same issue that I fixed previously in GH-11402, but in a
different place.

Closes GH-11422.
* PHP-8.1:
  Fix GH-11433: Unable to set CURLOPT_ACCEPT_ENCODING to NULL
  Fix "invalid state error" with cloned namespace declarations
  Fix lifetime issue with getAttributeNodeNS()
* PHP-8.2:
  Fix GH-11433: Unable to set CURLOPT_ACCEPT_ENCODING to NULL
  Fix "invalid state error" with cloned namespace declarations
  Fix lifetime issue with getAttributeNodeNS()
The magic method trampoline closure may be variadic. However, the
arg_info for the variadic argument was not set, resulting in a crash
both in reflection and in the VM.

Fix it by creating an arg_info containing a single element in case of
the variadic case. The variadic argument is the last one (and in this
case only one) in the arg_info array.

We make sure the argument info is equivalent to the argument info of
`$closure` of the following code snippet:
```
function foo(...$arguments) {}
$closure = foo(...);
```

Closes GH-11417.
another level of context for pg_last_error/pg_result_error() to include
or not the context in those. PQSHOW_CONTEXT_ERRORS being the default.

Close GH-11395
FreeBSD's shell is very POSIX strict. This patch makes sure it works
correctly under FreeBSD too.

Closes GH-11441.
* PHP-8.1:
  Fix cross-compilation check in phar generation for FreeBSD
* PHP-8.2:
  Fix cross-compilation check in phar generation for FreeBSD
Use common functions for creating and setting up similar objects

The increase in verbosity compared to the ``add_property_*()`` version is somewhat unfortunate, but the behaviour of ``add_property_str()`` releasing the zend_string is suboptimal, confusing, and has me concerned.
@chopins chopins merged commit dbdff8a into chopins:master Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.