Skip to content

[pull] master from php:master #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 373 commits into from
Aug 2, 2021
Merged

[pull] master from php:master #10

merged 373 commits into from
Aug 2, 2021

Conversation

pull[bot]
Copy link

@pull pull bot commented Jul 5, 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 Jul 5, 2021
@pull pull bot added ⤵️ pull and removed 🔍 Ready for Review Pull Request is not reviewed yet labels Jul 5, 2021
@trafico-bot trafico-bot bot added the 🔍 Ready for Review Pull Request is not reviewed yet label Jul 5, 2021
kocsismate and others added 26 commits July 14, 2021 15:21
This ports 247105a to the JIT
implementation. The issue doesn't trigger on the original test
case with JIT, but I ran into a case that does trigger with JIT
once we have typed properties.
* PHP-8.0:
  Add exception check to zend_jit_fetch_obj_w_slow()
We need to make sure that destructors can't access the partially
destroyed property. Do the same we do in HTs.

Fixes oss-fuzz #36205.
* PHP-7.4:
  Undef slot before destroying in unset_property
* PHP-8.0:
  Undef slot before destroying in unset_property
This was separately discussed in https://externals.io/message/114863,
but also necessary for consistency now that
https://wiki.php.net/rfc/new_in_initializers has landed.

Closes GH-7149.
Use a size_t instead of int because it tracks the size of the string
Cast to int to maintain the C stdlib API
If ther IteratorIterator is initialized (which we check), then
zobject cannot be undef and the return value cannot be null.
This reverts commit c252420.

This (currently) does not hold for invalid AppendIterators,
revert for now.
This can only return string|int|null, not any key type.
Adding two `zend_long`s may overflow, and casting `size_t` to
`zend_long` may truncate; we can avoid this here by enforcing unsigned
arithmetic.

Closes GH-7240.
* PHP-7.4:
  Fix #72146: Integer overflow on substr_replace
* PHP-8.0:
  Fix #72146: Integer overflow on substr_replace
The code was assuming that the returned value is an object.
Reuse the logic from IteratorIterator.
* PHP-8.0:
  Fix RecursiveIteratorIterator segfault for invalid aggregate
We must make sure that `handler->buffer.size + grow_max` does not
overflow, so we're using `safe_erealloc()` instead.

Closes GH-7241.
We would previously early exit on the WARNING, and miss the
later UNRESOLVED.
* PHP-7.4:
  Fix #72595: php_output_handler_append illegal write access
kamil-tekiela and others added 27 commits July 29, 2021 14:21
This functionality is not used productively in PHP and it's not used in
any of the extensions to my knowledge. Since it looks like this functionality
isn't required by anyone, let's clean up mysqlnd and drop it.
Instead always use the unlinked_uses table, which is already used
if opcache is used. Not much point in having a different mechanism
for the non-opcache case.
Dynamically declared classes categorically do not get linked during
preloading, even if all their dependencies are known. The warning
is misleading in this case, and there isn't anything the user can
do to address it.
It is very hard to determine in advance whether class linking will
fail due to missing dependencies in variance checks (#7314 attempts
this). This patch takes an alternative approach where we try to
perform inheritance on a copy of the class (zend_lazy_class_load)
and then restore the original class if inheritance fails. The fatal
error in that case is recorded and thrown as a warning later.

Closes GH-7319.
We don't guarantee any particular order, but this reduces test
failures under --preload that are sensitive to class order.

Add some ZEND_HASH_FOREACH_*_FROM macros to allow skipping the
persistent classes while iterating in forward direction.
These were broken when the deprecation warning was added, as the
extra output prevented the session from being started.
Avoid unnecessary output before a deprecation warning.
A genuine problem here is that we sometime get different class
casing due interaction with the ZSTR CE cache. Ignore these for
now.
Also skip observer tests, as these will observe the additional
preload file inserted by the test runner.
Part of the opcache variation job.
We need to remove DECLARE_FUNCTION + dynamic_defs for functions
defined in methods as well, not just for those declared in the
main script.
Also move PHP_DOUBLE_MAX_LENGTH to ZEND_DOUBLE_MAX_LENGTH.
This used to be necessary in the past because the NUM_BUF_SIZE
was set to 512, which is shorter than DOUBLE_MAX_LENGTH. Now the
value is either DOUBLE_MAX_LENGTH or larger (2048).
zend_double_to_str() converts a double to string in the way that
(string) would (using %.*H using precision).

smart_str_append_double() provides some more fine control over
the precision, and whether a zero fraction should be appeneded
for whole numbers.

A caveat here is that raw calls to zend_gcvt and going through
s*printf has slightly different behavior for the degenarate
precision=0 case. zend_gcvt will add a dummy E+0 in that case,
while s*printf convert this to precision=1 and will not. I'm
going with the s*printf behavior here, which is more common,
but does result in a minor change to the precision.phpt test.
@pull pull bot merged commit ac17b36 into ConnectionMaster:master Aug 2, 2021
@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 Aug 2, 2021
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.