#
8d36d79d |
| 09-Dec-2019 |
Nikita Popov |
Fix build
|
#
92c23e1f |
| 09-Dec-2019 |
Dmitry Stogov |
Call zend_unregister_ini_entries() when unload extension loaded through dl() without MSHUTDOWN callback. Extensions with MSHUTDOWN should use UNREGISTER_INI_ENTRIES().
|
#
6540797f |
| 04-Dec-2019 |
Nikita Popov |
Fixed bug #78898
|
#
bb30fe9e |
| 25-Nov-2019 |
Dmitry Stogov |
Fixed bug #78868 (Calling __autoload() with incorrect EG(fake_scope) value)
|
#
999e32b6 |
| 25-Sep-2019 |
Nikita Popov |
Implement union types According to RFC: https://wiki.php.net/rfc/union_types_v2 The type representation now makes use of both the pointer payload and the type mask at the same t
Implement union types According to RFC: https://wiki.php.net/rfc/union_types_v2 The type representation now makes use of both the pointer payload and the type mask at the same time. Additionall, zend_type_list is introduced as a new kind of pointer payload, which is used to store multiple class types. Each of the class types is a tagged pointer, which may be either a class name or class entry. The latter is only used for typed properties, while arguments/returns will instead use cache slots. A type list can contain a mix of both names and CEs at the same time, as not all classes may be resolvable. One thing this is missing is support for union types in arginfo and stubs, which I want to handle separately. I've also dropped the special object code from the JIT implementation for now -- I plan to add this back in a different form at a later time. For now I did not want to include non-trivial JIT changes together with large functional changes. Another possible piece of follow-up work is to implement "iterable" as an internal alias for "array|Traversable". I believe this will eliminate quite a few special-cases that had to be implemented. Closes GH-4838.
show more ...
|
#
ac4e0f08 |
| 20-Sep-2019 |
Nikita Popov |
Make zend_type a 2-field struct We now store the pointer payload and the type mask separately. This is in preparation for union types, where we will be using both at the same time.
Make zend_type a 2-field struct We now store the pointer payload and the type mask separately. This is in preparation for union types, where we will be using both at the same time. To avoid increasing the size of arginfo structures, the pass_by_reference and is_variadic fields are now stored as part of the type_mask (8-bit are reserved for custom use). Different types of pointer payloads are distinguished based on bits in the type_mask.
show more ...
|
#
14bdb0cf |
| 04-Nov-2019 |
Máté Kocsis |
Fix consistency issues with array accesses warnings/exceptions * Change a number of "resource used as offset" notices to warnings, which were previously missed. * Throw the "res
Fix consistency issues with array accesses warnings/exceptions * Change a number of "resource used as offset" notices to warnings, which were previously missed. * Throw the "resource used as offset" warning for isset() as well. * Make array_key_exists() behavior with regard to different key types consistent with isset() and normal array accesses. All key types now use the usual coercions and array/object keys throw TypeError. Closes GH-4887.
show more ...
|
#
4008704f |
| 01-Nov-2019 |
Christoph M. Becker |
zend_parse_parameters_throw() is obsolete Since `zend_parse_parameters()` throws now, there is no reason to explicitly call `zend_parse_parameters_throw()` anymore, and since both ha
zend_parse_parameters_throw() is obsolete Since `zend_parse_parameters()` throws now, there is no reason to explicitly call `zend_parse_parameters_throw()` anymore, and since both have actually the same implementation, we redefine the latter as macro.
show more ...
|
#
f1848a4b |
| 24-Oct-2019 |
Nikita Popov |
Fix bug #78226: Don't call __set() on uninitialized typed properties Assigning to an uninitialized typed property will no longer trigger a call to __set(). However, calls to __set() are
Fix bug #78226: Don't call __set() on uninitialized typed properties 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.
show more ...
|
#
c858d17f |
| 25-Oct-2019 |
Nikita Popov |
Optimize instanceof_function Split out the simple equality check into an inline function -- this is one of the common cases. Replace instanceof_function_ex with zend_class_imple
Optimize instanceof_function Split out the simple equality check into an inline function -- this is one of the common cases. Replace instanceof_function_ex with zend_class_implements_interface. There are a few more places where it may be used.
show more ...
|
#
12f4e9e0 |
| 10-Oct-2019 |
Nikita Popov |
Fix leak when property AST evaluation fails
|
#
21148679 |
| 08-Oct-2019 |
Nikita Popov |
Handle "non well formed" exception during ZPP Previously if the "non well formed" notice was converted into an exception we'd still end up executing the function. Also drop the
Handle "non well formed" exception during ZPP Previously if the "non well formed" notice was converted into an exception we'd still end up executing the function. Also drop the now unnecessary EG(exception) checks in the engine. Additionally remote a bogus exception in zend_is_callable: It should only be writing to error, but not directly throwing.
show more ...
|
#
0ebf2bdb |
| 26-Sep-2019 |
Nikita Popov |
Convert "Illegal offset type" warnings to exceptions
|
#
0c7124e6 |
| 23-Sep-2019 |
Christoph M. Becker |
Add check_only parameter to get_closure handler `get_closure` handlers are called to check whether an object is callable, and to actually get the closure, respectively. The behavior
Add check_only parameter to get_closure handler `get_closure` handlers are called to check whether an object is callable, and to actually get the closure, respectively. The behavior of the handler might differ for these two cases, particularly the handler may throw in the latter case, but should not in the former. Therefore we add a `check_only` parameter, to be able to distinguish the desired purpose.
show more ...
|
#
6276dd82 |
| 23-Sep-2019 |
Nikita Popov |
Use ZEND_TYPE_IS_SET() when checking for property types Instead of a simple if or 0 comparison. This would no longer work if zend_type is a struct.
|
#
9dfbcd72 |
| 18-Sep-2019 |
Christoph M. Becker |
Fix #78543: is_callable() on FFI\CData throws Exception If `Z_OBJ_HANDLER_P(callable, get_closure)` throws, we must not let the exeception pass to userland, if called through `is_callabl
Fix #78543: is_callable() on FFI\CData throws Exception If `Z_OBJ_HANDLER_P(callable, get_closure)` throws, we must not let the exeception pass to userland, if called through `is_callable()`.
show more ...
|
#
8807889a |
| 23-Aug-2019 |
Nikita Popov |
Fix arginfo leak when using disabled_classes Also remove the hack where scope is set to NULL in order to make free_internal_arg_info work. Instead explicitly call it for class method
Fix arginfo leak when using disabled_classes Also remove the hack where scope is set to NULL in order to make free_internal_arg_info work. Instead explicitly call it for class methods. This fixes the asan build for Zend/tests/bug77494.phpt.
show more ...
|
#
60dca229 |
| 22-Jul-2019 |
Dmitry Stogov |
Initialize static_members_table
|
#
9a833438 |
| 08-Jul-2019 |
Dmitry Stogov |
Delay EG(exception) check on slow path
|
#
36983035 |
| 28-Jun-2019 |
Nikita Popov |
Fix arginfo leak in disable_functions Arginfo is allocated if types are used, we need to free it.
|
Revision tags: php-7.2.19, php-7.3.6, php-7.1.30 |
|
#
61f78de4 |
| 26-May-2019 |
twosee |
Constify some char* arguments or return values of ZEND_API Closes GH-4247.
|
#
8f8fcbbd |
| 27-May-2019 |
Nikita Popov |
Support full variance if autoloading is used Keep track of delayed variance obligations and check them after linking a class is otherwise finished. Obligations may either be unresolv
Support full variance if autoloading is used Keep track of delayed variance obligations and check them after linking a class is otherwise finished. Obligations may either be unresolved method compatibility (because the necessecary classes aren't available yet) or open parent/interface dependencies. The latter occur because we allow the use of not fully linked classes as parents/interfaces now. An important aspect of the implementation is we do not require classes involved in variance checks to be fully linked in order for the class to be fully linked. Because the involved types do have to exist in the class table (as partially linked classes) and we do check these for correct variance, we have the guarantee that either those classes will successfully link lateron or generate an error, but there is no way to actually use them until that point and as such no possibility of violating the variance contract. This is important because it ensures that a class declaration always either errors or will produce an immediately usable class afterwards -- there are no cases where the finalization of the class declaration has to be delayed until a later time, as earlier variants of this patch did. Because variance checks deal with classes in various stages of linking, we need to use a special instanceof implementation that supports this, and also introduce finer-grained flags that tell us which parts have been linked already and which haven't. Class autoloading for variance checks is delayed into a separate stage after the class is otherwise linked and before delayed variance obligations are processed. This separation is needed to handle cases like A extends B extends C, where B is the autoload root, but C is required to check variance. This could end up loading C while the class structure of B is in an inconsistent state.
show more ...
|
Revision tags: php-7.2.19RC1, php-7.3.6RC1, php-7.1.29, php-7.2.18, php-7.3.5, php-7.2.18RC1, php-7.3.5RC1, php-7.2.17, php-7.3.4, php-7.1.28, php-7.3.4RC1, php-7.2.17RC1, php-7.1.27, php-7.3.3, php-7.2.16 |
|
#
a31f4642 |
| 26-Feb-2019 |
Nikita Popov |
Allow exceptions in __toString() RFC: https://wiki.php.net/rfc/tostring_exceptions And convert some object to string conversion related recoverable fatal errors into Error excep
Allow exceptions in __toString() RFC: https://wiki.php.net/rfc/tostring_exceptions And convert some object to string conversion related recoverable fatal errors into Error exceptions. Improve exception safety of internal code performing string conversions.
show more ...
|
#
ff96f25b |
| 03-Jun-2019 |
Joe Watkins |
Revert "Fix bug #62397 - disable_functions does not work with eval." This reverts commit 050d299364ded5cb7b878bc515aa763c9c623c4b.
|
#
321fe889 |
| 03-Jun-2019 |
Nikita Popov |
Add Z_PARAM_NUMBER and use it for some functions
|