#
bccda7eb |
| 01-Aug-2022 |
Arnaud Le Blanc |
Extended map_ptr before copying class table (#9188) Fixes GH-9164
|
Revision tags: php-8.1.7RC1, php-8.1.4RC1, php-8.1.3, php-8.1.2RC1, php-8.1.0, php-7.3.33, php-7.3.32 |
|
#
89007f67 |
| 14-Oct-2021 |
Nikita Popov |
Fix delayed early bind if class already exists We should not try to perform a delayed early bind if the class has already been declared. This matches the behavior of an ordinary earl
Fix delayed early bind if class already exists We should not try to perform a delayed early bind if the class has already been declared. This matches the behavior of an ordinary early bind.
show more ...
|
#
ddaf64b5 |
| 14-Oct-2021 |
Dmitry Stogov |
Avoid non-immutable map_ptr indirection
|
#
c19977d0 |
| 27-Sep-2021 |
Nikita Popov |
Fix delayed early binding with optimization It's possible for delayed early binding opcodes to get optimized away if they are "unreachable". However, we still need to attempt early b
Fix delayed early binding with optimization It's possible for delayed early binding opcodes to get optimized away if they are "unreachable". However, we still need to attempt early binding for them. (In some cases we also corrupt the early binding list outright during optimization, which is how I got here.) Fix this by storing information about delayed early binding independently of DECLARE_CLASS_DELAYED opcodes, so early binding is performed even after the opcode has been dropped.
show more ...
|
Revision tags: php-7.3.31 |
|
#
d9e5c6b0 |
| 14-Sep-2021 |
Nikita Popov |
Free recorded warnings if script not cached
|
#
76548e50 |
| 17-Nov-2021 |
Dmitry Stogov |
Fixed bug #81607 (CE_CACHE allocation with concurrent access)
|
#
10e9f6b3 |
| 14-Sep-2021 |
Nikita Popov |
Fix func/class name use after free on opcache OOM condition This can occur on opcache OOM conditions, where the function/class names are not interned and the script does not get cached.
Fix func/class name use after free on opcache OOM condition This can occur on opcache OOM conditions, where the function/class names are not interned and the script does not get cached. In that case the functions/classes get transferred from the persistent script to the global tables, without incrementing the key refcount. To mirror that, we should also not try to free the keys when freeing the persistent script. For this by setting the number of elements to zero, which will free only the hashtable structure itself.
show more ...
|
Revision tags: php-7.3.30 |
|
#
ae8647d9 |
| 20-Jul-2021 |
Levi Morrison |
Remove leading underscore for _zend_hash_find_known_hash (#7260) Convert zend_hash_find_ex(..., 1) to zend_hash_find_known_hash(...) Convert zend_hash_find_ex(..., 0) to zend_hash_find(.
Remove leading underscore for _zend_hash_find_known_hash (#7260) Convert zend_hash_find_ex(..., 1) to zend_hash_find_known_hash(...) Convert zend_hash_find_ex(..., 0) to zend_hash_find(...) Also add serializable changes to UPGRADING.INTERNALS summary
show more ...
|
Revision tags: php-7.3.29 |
|
#
01b3fc03 |
| 06-May-2021 |
KsaR |
Update http->https in license (#6945) 1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https. 2. Update few license 3.0 to 3.01 as
Update http->https in license (#6945) 1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https. 2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier". 3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted. 4. fixed indentation in some files before |
show more ...
|
Revision tags: php-7.3.28 |
|
#
0fc3818c |
| 13-Apr-2021 |
Dmitry Stogov |
Initialize fast class cache
|
#
65859fe1 |
| 11-Mar-2021 |
Dmitry Stogov |
Inheritance cache optimization
|
Revision tags: php-7.3.27, php-7.3.26, php-7.3.26RC1, php-7.3.25, php-7.3.25RC1, php-7.3.24, php-7.3.24RC1, php-7.3.23, php-7.3.23RC1, php-7.3.22, php-7.3.22RC1, php-7.3.21, php-7.3.21RC1, php-7.3.20, php-7.3.20RC1, php-7.3.19, php-7.4.7RC1, php-7.3.19RC1 |
|
#
47a2e5c7 |
| 18-May-2020 |
Nikita Popov |
Reference dynamic functions through dynamic_defs Currently, dynamically declared functions and closures are inserted into the function table under a runtime definition key, and then late
Reference dynamic functions through dynamic_defs 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.
show more ...
|
#
5d160e30 |
| 17-Feb-2021 |
Nikita Popov |
Fix static variable behavior with inheritance When a method is inherited, the static variables will now always use the initial values, rather than the values at the time of inheritan
Fix static variable behavior with inheritance When a method is inherited, the static variables will now always use the initial values, rather than the values at the time of inheritance. As such, behavior no longer depends on whether inheritance happens before or after a method has been called. This is implemented by always keeping static_variables as the original values, and static_variables_ptr as the modified copy. Closes GH-6705.
show more ...
|
#
4b79dba9 |
| 09-Feb-2021 |
Dmitry Stogov |
Added Inheritance Cache. This is a new transparent technology that eliminates overhead of PHP class inheritance. PHP classes are compiled and cached (by opcahce) separately, howeve
Added Inheritance Cache. This is a new transparent technology that eliminates overhead of PHP class inheritance. PHP classes are compiled and cached (by opcahce) separately, however their "linking" was done at run-time - on each request. The process of "linking" may involve a number of compatibility checks and borrowing methods/properties/constants form parent and traits. This takes significant time, but the result is the same on each request. Inheritance Cache performs "linking" for unique set of all the depending classes (parent, interfaces, traits, property types, method types involved into compatibility checks) once and stores result in opcache shared memory. As a part of the this patch, I removed limitations for immutable classes (unresolved constants, typed properties and covariant type checks). So now all classes stored in opcache are "immutable". They may be lazily loaded into process memory, if necessary, but this usually occurs just once (on first linking). The patch shows 8% improvement on Symphony "Hello World" app.
show more ...
|
#
b3bbb8fe |
| 19-Jan-2021 |
Dmitry Stogov |
Mark classes cached by opcache by ZEND_ACC_CACHED flag and prevent useless copying and desrpoying of immutable data.
|
#
aa16aee5 |
| 12-Jan-2021 |
Dmitry Stogov |
Cleanup: - ZCG(bind_hash) is not used anymore - zend_accel_function_hash_copy() and zend_accel_function_hash_copy_from_shm() are the same - zend_accel_class_hash_copy() and zend_acce
Cleanup: - ZCG(bind_hash) is not used anymore - zend_accel_function_hash_copy() and zend_accel_function_hash_copy_from_shm() are the same - zend_accel_class_hash_copy() and zend_accel_class_hash_copy_from_shm() are almost the same
show more ...
|
#
1314ccbf |
| 26-Jun-2020 |
Nikita Popov |
Cache __unserialize() instead of unserialize() We should use these cache slots for the new object serialization mechanism rather than the old one.
|
#
95248491 |
| 20-May-2020 |
Dmitry Stogov |
Prefer already cached version of the script
|
Revision tags: php-7.3.18RC1, php-7.2.30, php-7.3.17, php-7.3.17RC1, php-7.3.18, php-7.3.16, php-7.3.16RC1, php-7.3.15RC1, php-7.3.15, php-7.3.14 |
|
#
bd197728 |
| 16-Jan-2020 |
Nikita Popov |
Use zend_type inside type lists Instead of having a completely independent encoding for type list entries. This is going to use more memory, but I'm not particularly concerned about
Use zend_type inside type lists Instead of having a completely independent encoding for type list entries. This is going to use more memory, but I'm not particularly concerned about that, as type unions that contain multiple classes should be uncommon. On the other hand, this allows us to treat top-level types and types inside lists mostly the same. A new ZEND_TYPE_FOREACH macros allows to transparently treat list and non-list types the same way. I'm not using it everywhere it could be used for now, just the places that seemed most obvious. Of course, this will make any future type system changes much simpler, as it will not be necessary to duplicate all logic two times.
show more ...
|
Revision tags: php-7.3.14RC1 |
|
#
bd4fce4f |
| 18-Dec-2019 |
Nikita Popov |
Fixed bug #78986 Don't assume that handlers live in the arena, they may also be in SHM.
|
Revision tags: php-7.3.13 |
|
#
0f2cdbf2 |
| 11-Dec-2019 |
Nikita Popov |
Introduce extra counter to avoid RTD key collisions Also generate a fatal error if a collision occurs in zend_compile. This is not perfect, because collisions might still be introdu
Introduce extra counter to avoid RTD key collisions Also generate a fatal error if a collision occurs in zend_compile. This is not perfect, because collisions might still be introduced via opcache, if one file is included multiple times during a request, invalidate in the meantime and recompiled by different processes. This still needs to be addressed, but this patch fixes the much more common case of collisions occuring when opcache is not used. Fixes bug #78903.
show more ...
|
Revision tags: php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12, php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1, php-7.4.0RC5, php-7.1.33, php-7.2.24, php-7.3.11, php-7.4.0RC4, php-7.3.11RC1, php-7.2.24RC1, php-7.4.0RC3 |
|
#
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 ...
|
Revision tags: php-7.2.23, php-7.3.10 |
|
#
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 ...
|
#
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 ...
|
#
e2a6bf48 |
| 09-Oct-2019 |
Mitch Hagstrand |
Fix checksum calculation for opcache
|