summaryrefslogtreecommitdiff
path: root/Zend
Commit message (Collapse)AuthorAgeFilesLines
* Fixed bug #78935: Check that all linked classes can be preloadedNikita Popov2019-12-101-2/+2
| | | | | | | | | 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.
* Fix buildNikita Popov2019-12-091-0/+1
|
* Export zend_init_func_run_time_cache()Dmitry Stogov2019-12-092-0/+8
|
* Call zend_unregister_ini_entries() when unload extension loaded through dl() ↵Dmitry Stogov2019-12-091-0/+6
| | | | | | without MSHUTDOWN callback. Extensions with MSHUTDOWN should use UNREGISTER_INI_ENTRIES().
* Fixed bug #78926: Handle class table reallocation on failed linkNikita Popov2019-12-094-2/+28
| | | | | | | | | | 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.
* Use unmangled named in property type inheritance errorNikita Popov2019-12-092-1/+12
|
* Fixed bug #78904: Don't call any magic for uninitialized typed propertiesNikita Popov2019-12-096-4/+40
| | | | | | | | | | | | | 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.
* Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-12-062-12/+24
|\ | | | | | | | | * PHP-7.3: Fix constant evaluation of && and ||
| * Fix constant evaluation of && and ||Nikita Popov2019-12-062-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-12-042-3/+3
|\ \ | |/ | | | | | | * PHP-7.3: Fix AST printing of nullable builtin types
| * Fix AST printing of nullable builtin typesNikita Popov2019-12-042-3/+3
| | | | | | | | Fixes oss-fuzz #19109.
| * Next is 7.3.14Christoph M. Becker2019-12-031-1/+1
| |
* | Fixed bug #78898Nikita Popov2019-12-042-5/+41
| |
* | Merge branch 'PHP-7.3' into PHP-7.4Dmitry Stogov2019-11-252-0/+39
|\ \ | |/ | | | | | | * PHP-7.3: Fixed bug #78868 (Calling __autoload() with incorrect EG(fake_scope) value)
| * Fixed bug #78868 (Calling __autoload() with incorrect EG(fake_scope) value)Dmitry Stogov2019-11-252-0/+39
| |
* | Handle reallocated root buffer during GC destroy phase (v2)Tyson Andre2019-11-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge branch 'PHP-7.3' into PHP-7.4Dmitry Stogov2019-11-182-8/+24
|\ \ | |/ | | | | | | * PHP-7.3: Fix $x = (bool)$x; for undefined with opcache
| * Merge branch 'PHP-7.2' into PHP-7.3Dmitry Stogov2019-11-182-8/+24
| |\ | | | | | | | | | | | | * PHP-7.2: Fix $x = (bool)$x; for undefined with opcache
| | * Fix $x = (bool)$x; for undefined with opcacheTyson Andre2019-11-182-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
* | | Handle reallocated root buffer during GC destroy phaseNikita Popov2019-11-151-5/+6
| | | | | | | | | | | | | | | | | | | | | We no longer protect GC during the destroy phase, so we need to deal with buffer reallocation. Possible fix for bug #78811.
* | | Zend Engine version is no longer in -devDerick Rethans2019-11-151-1/+1
| | |
* | | Fixed bug #78810Nikita Popov2019-11-152-2/+35
| | |
* | | wsDmitry Stogov2019-11-121-7/+7
| | |
* | | Disable ifunc resolvers under thread sanitizer as wellNikita Popov2019-11-071-1/+1
| | |
* | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-11-061-0/+22
|\ \ \ | |/ / | | | | | | | | | * PHP-7.3: Fixed bug #78787
| * | Fixed bug #78787Nikita Popov2019-11-062-4/+30
| | | | | | | | | | | | | | | Not the first time inheritance of shadow properties causes an issue, thankfully this whole concept is gone in PHP 7.4.
| * | 7.3.13 is nextChristoph M. Becker2019-11-051-1/+1
| | |
* | | Revert "Remove configure checks for supported instruction sets"Nikita Popov2019-11-041-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Fixed bug #78768Nikita Popov2019-11-011-4/+2
| | | | | | | | | | | | | | | Remove the typedef from zend_types.h, use explicit struct prefix instead.
* | | Remove configure checks for supported instruction setsNikita Popov2019-10-311-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-10-301-0/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.3: Add missing refcount increment
| * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-10-301-0/+1
| |\ \ | | |/ | | | | | | | | | * PHP-7.2: Add missing refcount increment
| | * Add missing refcount incrementNikita Popov2019-10-301-0/+1
| | |
* | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-10-292-1/+21
|\ \ \ | |/ / | | | | | | | | | * PHP-7.3: Fixed bug #78689
| * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-10-292-1/+21
| |\ \ | | |/ | | | | | | | | | * PHP-7.2: Fixed bug #78689
| | * Fixed bug #78689Nikita Popov2019-10-292-1/+21
| | |
* | | Remove redundant variable rv and optimize codeZiMuyang2019-10-281-2/+2
| | | | | | | | | | | | Closes GH-4864.
* | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-10-282-8/+36
|\ \ \ | |/ / | | | | | | | | | * PHP-7.3: Fix bug #78752
| * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-10-282-8/+36
| |\ \ | | |/ | | | | | | | | | * PHP-7.2: Fix bug #78752
| | * Fix bug #78752Nikita Popov2019-10-282-8/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Fix bug #78226: Don't call __set() on uninitialized typed propertiesNikita Popov2019-10-256-7/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Remove recursive check from instanceof_interfaceNikita Popov2019-10-252-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Optimize instanceof_class/interfaceNikita Popov2019-10-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Clean up and clarify instanceof_function_ex()Nikita Popov2019-10-242-29/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Reverting push to wrong repoRasmus Lerdorf2019-10-231-27/+6
| | |
* | | Update alloc patchRasmus Lerdorf2019-10-231-6/+27
| | |
* | | Don't autoload when checking property typesNikita Popov2019-10-232-1/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Allow loading FFI bindings through ffi.preload directiveDmitry Stogov2019-10-221-0/+3
| | |
* | | Fix static prop cleanup for dl'ed internal classesNikita Popov2019-10-212-14/+36
| | |
* | | Fix leak with cycle in static prop of internal classNikita Popov2019-10-212-5/+12
| | | | | | | | | | | | | | | More the cleanup of interned classes before the final GC run, just like it is done for user classes.