Skip to content

[pull] master from php:master #13

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 1,340 commits into from
Feb 4, 2022
Merged

[pull] master from php:master #13

merged 1,340 commits into from
Feb 4, 2022

Conversation

pull[bot]
Copy link

@pull pull bot commented Oct 4, 2021

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@trafico-bot trafico-bot bot added the 🔍 Ready for Review Pull Request is not reviewed yet label Oct 4, 2021
@pull pull bot added ⤵️ pull and removed 🔍 Ready for Review Pull Request is not reviewed yet labels Oct 4, 2021
@trafico-bot trafico-bot bot added the 🔍 Ready for Review Pull Request is not reviewed yet label Oct 4, 2021
7snovic and others added 26 commits December 23, 2021 14:26
This is a tiny improvement to run-tests.php which helps keep it from
tripping over hidden files, including autosave files from various
editors, metadata on certain platforms, etc.

Closes GH-7783.
On NetBSD, ifconf.ifc_buf member, unlike most of platforms, is a void
pointer.

We also fix the cpuinfo declarations with empty parameter lists.

Closes GH-7819.
* PHP-8.0:
  Avoid void* arithmetic in sockets/multicast.c on NetBSD
* PHP-8.1:
  Avoid void* arithmetic in sockets/multicast.c on NetBSD
While the `path` is not supposed to be `NULL` for normal operation, it
is possible to create `SplFileInfo` objects where that is the case, and
we must not follow the null pointer.

Closes GH-7814.
* PHP-8.1:
  Fix GH-7809: Cloning a faked SplFileInfo object may segfault
Fixes oss-fuzz #42878
* PHP-8.0:
  Fix memory leak in SCCP
* PHP-8.1:
  Fix memory leak in SCCP
…r may update the same HashTable.

Fixes oss-fuzz #42894
zend_optimizer_update_op1_const() already handles these cases.
update_op1_const() implements the right logic here -- these cannot
be replaced by different opcodes, as the by-ref passing behavior
is not the same.
update_op1_const() can handle these nowadays.
While we can't replace the instanceof operand, we will evaluate
the instanceof to false and replace its result anyway. Even in
cases where the instanceof user cannot be replaced, we already
have generic code to convert the opcode to QM_ASSIGN in that
case.
The generic code was rejecting this to go into a special code path
in SCCP. We should directly do that in SCCP instead, to still allow
the generic (and valid) replacement.
Instead propagate the FETCH_CLASS return value, so it can be
directly replaced if possible, which will also eliminate the
FETCH_CLASS subsequently.
These are supported as constants nowadays, so we can drop the
string check.

Also fix a potential leak, though I believe this doesn't matter in
current usage, as it will effectively be suppressed during persist.
This seems to date back to a time where zval_ptr_dtor was a macro
implicitly passing additional parameters.
Signed-off-by: Anatol Belski <[email protected]>
The replace const or replace with QM_ASSIGN pattern is common to
all constant folding, extract it into a function.
…tion

Nowadays self::X is represented using an UNUSED operand with
FETCH_CLASS_SELF flag rather than a separate FETCH_CLASS instruction.
The code already handles the new pattern.
This handles references to the current class through its name
rather than self (and for cases where is is not linked yet and
thus not covered by the context lookup). Rather than handling this
only for FETCH_CLASS_CONSTANT optimization, integrate this into
the generic get_class_entry() utility.
Export and reuse this helper in places that fetch a class entry
from op1.
Move literal destruction into helper and use a common result
variable to make code more compact.
dstogov and others added 27 commits January 28, 2022 12:38
Fixes oss-fuzz #43988
Fixes oss-fuzz #44006
* PHP-8.0:
  Fix incorrect register allocation
* PHP-8.0:
  JIT: Fix incorrect type store elimination
* PHP-8.1:
  JIT: Fix incorrect type store elimination
  Fix incorrect register allocation
Closes GH-8008

As a new learner to PHP Zend VM, the first place I can find information
is this README.md. Unfortunately, it has not included the latest Zend VM
kind and code generation script.

With code reading and trail-and-error experiments, I found a few updates
that might be helpful to new learners.

ChangeLog:
1) Add HYBRID threading model
2) Remove --without-old-executor option and description
3) ZE2 --> ZE3 (Since PHP 7)
4) Change default VM kind from CALL to HYBRID

Signed-off-by: Su, Tao <[email protected]>
Closes GH-7847
Closes GH-7852

Previously stripos/stristr would lowercase both the haystack and the
needle to reuse strpos. The approach in this PR is similar to strpos.
memchr is highly optimized so we're using it to search for the first
character of the needle in the haystack. If we find it we compare the
remaining characters of the needle manually.

The new implementation seems to perform about half as well as strpos (as
two memchr calls are necessary to find the next candidate).
Fixes oss-fuzz #44222
* PHP-8.0:
  Fix memory leak
* PHP-8.1:
  Fix memory leak
* PHP-8.1:
  Prevent array modification if it's captured by user error handler during index conversion
* PHP-8.0:
  JIT: Fix register alloction (missed store)
* PHP-8.1:
  JIT: Fix register alloction (missed store)
* PHP-8.0:
  Bump for 8.0.17-dev
* PHP-8.1:
  Bump for 8.0.17-dev
Pull requests with the "Waiting on Author" label should still not be
closed if they have the RFC label as closing them requires manual
action. Also avoid closing "Waiting on Review".
* PHP-8.1:
  Bump for 8.1.4-dev
If an output handler has not yet been started, calling `ob_clean()`
causes it to start.  If that happens, we must not forget to set the
`Content-Encoding` and `Vary` headers.

Closes GH-7960.
* PHP-8.0:
  Fix GH-7953: ob_clean() only does not set Content-Encoding
* PHP-8.1:
  Fix GH-7953: ob_clean() only does not set Content-Encoding
@pull pull bot merged commit 706398f into ConnectionMaster:master Feb 4, 2022
@trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed 🔍 Ready for Review Pull Request is not reviewed yet labels Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⤵️ pull ✨ Merged Pull Request has been merged successfully
Projects
None yet
Development

Successfully merging this pull request may close these issues.