Skip to content
forked from php/php-src

sysnc #10

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 4,597 commits into from
Nov 16, 2021
Merged

sysnc #10

merged 4,597 commits into from
Nov 16, 2021

Conversation

chopins
Copy link
Owner

@chopins chopins commented Nov 16, 2021

No description provided.

nikic and others added 30 commits November 1, 2021 09:50
For $ary[idx] op= $ary we should evaluate the RHS operand first,
otherwise we may create a reference-free recursive array. Use the
same handling we do for the normal $ary[idx] = $ary case.

Fixes oss-fuzz #40287.
* PHP-8.1:
  Fix self-assign evaluation order for ASSIGN_DIM_OP
…ies/etc

The purpose of mbstring is for working with Unicode and legacy text
encodings; but Base64, QPrint, etc. are not text encodings and don't
really belong in mbstring. PHP already contains separate implementations
of Base64, QPrint, and HTML entities. It will be better to eventually
remove these non-encodings from mbstring.

Regarding HTML entities... there is a bit more to say. mbstring's
implementation of HTML entities is different from the other built-in
implementation (htmlspecialchars and htmlentities). Those functions
convert <, >, and & to HTML entities, but mbstring does not.

It appears that the original author of mbstring intended for something
to be done with <, >, and &. He used a table to identify which
characters should be converted to HTML entities, and </>/& all have a
special value in that table. However, nothing ever checks for that
special value, so the characters are passed through unconverted.

This seems like a very useless implementation of HTML entities. The most
important characters which need to be expressed as entities in HTML
documents are those three!
The variable may come from a phi node, in which case we should
take the defining block from it.

Fixes oss-fuzz #40453.
* PHP-8.1:
  Fix scdf loop var free check for phi vars
In this case zend_exception_set_previous() would destroy the
fast_call exception and further accesses on ex would be invalid.
We should only update ex if we update EG(exception).

Fixes oss-fuzz #40464.
* PHP-8.0:
  Fix finally exception chaining on recursion
* PHP-8.1:
  Fix finally exception chaining on recursion
We shouldn't switch from range to no range for ZEND_DIV and instead
explicitly return an overflowing range. Otherwise the range will
not actually get updated during widening, and we'll perform
essentially infinite narrowing.

Fixes oss-fuzz #40566.
* PHP-8.0:
  Fix range inference hang
* PHP-8.1:
  Fix range inference hang
This can happen if a call is optimized, but FETCH_DIM_FUNC_ARG
cannot be converted to FETCH_DIM_R because it uses an UNUSED op2,
which is not supported by FETCH_DIM_R.

Fixes oss-fuzz 6144185837682688.
* PHP-8.0:
  Handle FETCH_DIM_R after FETCH_DIM_FUNC_ARG in inference
* PHP-8.1:
  Handle FETCH_DIM_R after FETCH_DIM_FUNC_ARG in inference
* PHP-8.0:
  JIT: Fixed register allocation in case of integer overflow
* PHP-8.1:
  JIT: Fixed register allocation in case of integer overflow
* PHP-8.0:
  JIT: Fixed numeric string index handling
* PHP-8.1:
  JIT: Fixed numeric string index handling
* PHP-8.0:
  Fixed incorrect assumption about reference counting
* PHP-8.1:
  Fixed incorrect assumption about reference counting
* PHP-8.0:
  Tracing JIT: Fixed reference counting when escape because of IS_UNDEF element
* PHP-8.1:
  Tracing JIT: Fixed reference counting when escape because of IS_UNDEF element
* PHP-8.0:
  Tracing JIT: Fixed reference counting when escape because of IS_UNDEF element (test)
* PHP-8.1:
  Tracing JIT: Fixed reference counting when escape because of IS_UNDEF element (test)
bukka and others added 29 commits November 14, 2021 20:14
The libxml based XML functions accepting a filename actually accept
URIs with possibly percent-encoded characters.  Percent-encoded NUL
bytes lead to truncation, like non-encoded NUL bytes would.  We catch
those, and let the functions fail with a respective warning.
* PHP-7.3:
  Fix #79971: special character is breaking the path in xml function
* PHP-7.4:
  Fix #79971: special character is breaking the path in xml function
* PHP-8.0:
  Fix #79971: special character is breaking the path in xml function
* PHP-8.0:
  Fix #79971: special character is breaking the path in xml function
* PHP-8.0:
  JIT: Fixed reference-counting inference
* PHP-8.1:
  JIT: Fixed reference-counting inference
This interacted unfortunately with the addition of the %0 placeholder
in 8.1. Use %r to escape it.
* PHP-8.1:
  Fix new simplexml test
Modify dns_get_record to test for records result based on dns_errno to
accommodate modern FreeBSD, for which res_nsearch() does not update
h_errno directly. Add new php_dns_errno macro, and have it consult
statp->res_h_errno when OS has res_nsearch().

Closes GH-7655.
* PHP-7.4:
  Fix bug #81618: Correct dns_get_record on FreeBSD
* PHP-8.0:
  Fix bug #81618: Correct dns_get_record on FreeBSD
* PHP-8.1:
  Fix bug #81618: Correct dns_get_record on FreeBSD
The generated type was missing the UNION bit. Add a ZEND_TYPE_INIT_UNION
macro to hide the implementation details.
* PHP-8.1:
  Fix generation of property with class union type
  Replace SKIPIF with EXTENSIONS
* PHP-8.1:
  Optimize closures nested in other closures
* PHP-8.0:
  Tracing JIT: Fixed failure on non-optimized op_arrays (op_array->T may be above ssa->vars_count)
* PHP-8.1:
  Tracing JIT: Fixed failure on non-optimized op_arrays (op_array->T may be above ssa->vars_count)
* PHP-8.0:
  Tracing JIT: Fixed abstract stack consistency for [QM_]ASSIGN of CV to itself
* PHP-8.1:
  Tracing JIT: Fixed abstract stack consistency for [QM_]ASSIGN of CV to itself
@chopins chopins merged commit 2032ee3 into chopins:master Nov 16, 2021
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.