| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
During preloading, check that all classes that have been included
as part of the preload script itself (rather than through opcache_compile_file)
can actually be preloaded, i.e. satisfy Windows restrictions, have
resolved initializers and resolved property types. When resolving
initializers and property types, also autoload additional classes.
Because of this, the resolution runs in a loop.
|
| |
|
| |
|
|
|
|
|
|
| |
without MSHUTDOWN callback.
Extensions with MSHUTDOWN should use UNREGISTER_INI_ENTRIES().
|
|
|
|
|
|
|
|
|
|
| |
When we change back the bucket key on a class linking failure,
make sure to reload the bucket pointer, as the class table may
have been reallocated in the meantime.
Also remove a bogus bucket key change in anon class registration:
We don't actually rename the class in this case anymore, the RTD
key is already the final name.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We already changed the behavior for __set() in f1848a4. However, it
seems that this is also a problem for all the other property magic,
see bug #78904.
This commit makes the behavior of all the property magic consistent:
Magic will not be triggered for uninitialized typed properties, only
explicitly unset() ones. This brings behavior more in line how
non-typed properties behave and avoids WTF.
Closes GH-4974.
|
|\
| |
| |
| |
| | |
* PHP-7.3:
Fix constant evaluation of && and ||
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The "return" in the for loop should have been a break on the switch,
otherwise the result is just ignored... but because it prevents
evaluation of the other operand, it also violates the invariant that
everything has been constant evaluated, resulting in an assertion
failure.
The for loop isn't correct in any case though, because it's not legal
to determine the result based on just the second operand, as the
first one may have a side-effect that cannot be optimized away.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix AST printing of nullable builtin types
|
| |
| |
| |
| | |
Fixes oss-fuzz #19109.
|
| | |
|
| | |
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fixed bug #78868 (Calling __autoload() with incorrect EG(fake_scope) value)
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We no longer protect GC during the destroy phase, so we need to
deal with buffer reallocation.
Note that the implementation of spl_SplObjectStorage_free_storage
will call the destructor of SplObjectStorage, and free the instance properties,
which I think is what caused the root buffer to be reallocated.
(`current` is a pointer for an index within the root buffer?)
This fixes bug #78811 for me.
Closes GH-4935
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix $x = (bool)$x; for undefined with opcache
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.2:
Fix $x = (bool)$x; for undefined with opcache
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
And `$x = !$x`
Noticed while working on GH-4912
The included test would not emit undefined variable errors in php 8.0
with opcache enabled. The command used:
```
php -d zend_extension=opcache.so --no-php-ini -d error_reporting=E_ALL \
-d opcache.file_cache= -d opcache.enable_cli=1 test.php
```
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We no longer protect GC during the destroy phase, so we need to
deal with buffer reallocation.
Possible fix for bug #78811.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.3:
Fixed bug #78787
|
| | |
| | |
| | |
| | |
| | | |
Not the first time inheritance of shadow properties causes an issue,
thankfully this whole concept is gone in PHP 7.4.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit edccf32f7f36a8bc759b9482737e0c3efcb3a005.
This was reported to cause issues for as yet unknown reasons in
bug #78769. As this was intended as code cleanup, revert this from
7.4 at least. May reapply it to master later.
|
| | |
| | |
| | |
| | |
| | | |
Remove the typedef from zend_types.h, use explicit struct prefix
instead.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
These were checking whether the instruction set is supported by
the host CPU, however they were only used to condition on whether
this instruction set is targeted at all. It would still use dynamic
dispatch (e.g. based on ifunc resolvers) to select the actual
implementation. Whether the target is guaranteed to support the
instruction set without dispatch is determined based on pre-defined
macros like __SSE2__.
This removes the configure-time builtin cpu checks to remove
confusion. Additionally this allows targeting an architecture that
is newer than the host architecture.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.3:
Add missing refcount increment
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.2:
Add missing refcount increment
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.3:
Fixed bug #78689
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.2:
Fixed bug #78689
|
| | | |
|
| | |
| | |
| | |
| | | |
Closes GH-4864.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.3:
Fix bug #78752
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.2:
Fix bug #78752
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
NULL out the execute_data before destroying it, otherwise GC may
trigger while the execute_data is partially destroyed, resulting
in double-frees.
The handling of call stack unfreezing is a bit awkward because it's
a ZEND_API function, so we can't change the signature.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Assigning to an uninitialized typed property will no longer trigger
a call to __set(). However, calls to __set() are still triggered if
the property is explicitly unset().
This gives us both the behavior people generally expect, and still
allows ORMs to do lazy initialization by unsetting properties.
For PHP 8, we should fine a way to forbid unsetting of declared
properties entirely, and provide a different way to achieve lazy
initialization.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Parent interfaces are copied into the interface list during
inheritance, so there's no need to perform a recursive check.
Only exception are instanceof checks performed during inheritance
itself. However, we already have unlinked_instanceof for this
purpose, it just needs to be taught to handle this case.
Closes GH-4857.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
instanceof_class does not need to check for a NULL pointer in the
first iteration -- passing NULL to this function is illegal.
instanceof_interface does not need to use instanceof_class(), it
only has to check whether the CEs match exactly. There is no way
for an interface to appear inside "parent", it will always be in
"interfaces" only.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The instanceof_interface_only() function was dead code (always
returned zero).
Clarify that the last parameter indicates whether the passed CE
is interface or class and rewrite the code in terms of assertions.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Noticed while working on union types: We do not load argument and
return types during type checks, but we do load property types.
I'm normalizing the behavior towards the existing status quo (not
loading), though we may consider loading everywhere (all types,
and instanceof) in order to properly support class aliases.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
More the cleanup of interned classes before the final GC run,
just like it is done for user classes.
|