| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
The unmangled name is already available as the hashtable key,
use it directly.
|
| |
|
|
|
|
| |
This if branch seems to be a remain of when certain type errors where E_WARNINGs, something which isn't the case since PHP 8.0.
|
|
|
|
|
|
|
| |
This reverts commit 9162116a854fe37ce2c07a75b5ef7d797acba0ee.
This causes many "__HALT_COMPILER(); must be declared in a phar"
errors in phar tests on windows.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This handles the degenerate case where SCCP replaced the value in
the RETURN opcode with a constant, but the VERIFY_RETURN is still
there. We can still apply the same optimization, just don't need
to adjust the use list in this case.
The result is still sub-optimal in that a dead QM_ASSIGN is left
behind.
|
| |
|
|
|
|
| |
Thet search for an element with given key/index and add an empty one (NULL), if no found.
|
|
|
|
| |
Fixes oss-fuzz #31983.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
And fix a type in the fetch class flags dumping while here.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
RFC: https://wiki.php.net/rfc/enumerations
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
Closes GH-6489.
|
|
|
|
| |
Closes GH-6784
|
|
|
|
|
| |
This allows to eliminate re-calculation of string lenght and hash value.
See the detailed list of changes in UPGRADING.INTERNALS.
|
|
|
|
|
| |
As $(PHP) is not an absolute path, test -x doesn't do anything
meaningful. Rely on the autoconf check.
|
| |
|
|
|
|
|
|
|
| |
This reverts commit c386b1fb177ec0dccc840cbec801e69609ced5c3.
It looks like at least some of these might be needed for ordering
in a clean build?
|
| |
|
|
|
|
| |
These are now automatically tracked by the build system.
|
|\
| |
| |
| |
| | |
* PHP-8.0:
Fix refcount inference for typed properties
|
| |
| |
| |
| |
| |
| | |
If an internal class overrides read_property and declared property
types, make sure that the returned value matches the declared
type (in debug builds).
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
argument few times.
|
| | |
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
This is a follow-up to:
https://github.com/php/php-src/commit/3c6ab4b3ea5854fd44a2945bb65bf027a6c94890
Closes GH-6744.
|
| | |
|
|\ \
| |/
| |
| |
| | |
* PHP-8.0:
Fixed bug #80811
|
| |
| |
| |
| |
| | |
When filling in defaults for skipped params, make sure that
reference parameters get the expected reference wrapper.
|
|\ \
| |/
| |
| |
| | |
* PHP-8.0:
Always remove HT iterators, even for uninit HT
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.4:
Always remove HT iterators, even for uninit HT
|
| | |
| | |
| | |
| | | |
Fixes oss-fuzz #31423.
|
|\ \ \
| | | |
| | | |
| | | | |
comparison, etc. Now properties are ordered according to their layout in zend_object structure.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
etc.
Now properties are ordered according to their layout in zend_object structure.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently, dynamically declared functions and closures are inserted
into the function table under a runtime definition key, and then later
possibly renamed. When opcache is not used and a file containing a
closure is repeatedly included, this leads to a very large memory leak,
as the no longer needed closure declarations will never be freed
(https://bugs.php.net/bug.php?id=76982).
With this patch, dynamic functions are instead stored in a
dynamic_func_defs member on the op_array, which opcodes reference
by index. When the parent op_array is destroyed, the dynamic_func_defs
it contains are also destroyed (unless they are stilled used elsewhere,
e.g. because they have been bound, or are used by a live closure). This
resolves the fundamental part of the leak, though doesn't completely
fix it yet due to some arena allocations.
The main non-obvious change here is to static variable handling:
We can't destroy static_variables_ptr in destroy_op_array, as e.g.
that would clear the static variables in a dynamic function when
the op_array containing it is destroyed. Static variable destruction
is separated out for this reason (we already do static variable
destruction separately for normal functions, so we only need to
handle main scripts).
Closes GH-5595.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
explode(): Passing null to parameter #2 ($string) of type string is
deprecated
Closes GH-6698.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Don't mind me, I just happened to be browsing this code. 🙃
Closes GH-6721.
[ci skip]
|
| | |
| | |
| | |
| | |
| | |
| | | |
xsl, zip, Zend
Closes GH-6706
|