#
af2110e6 |
| 29-Aug-2023 |
Ilija Tovilo |
Fix freeing of incompletely initialized closures Addref to relevant fields before allocating any memory. Also only set/remove the ZEND_ACC_HEAP_RT_CACHE flag after allocating memory.
Fix freeing of incompletely initialized closures Addref to relevant fields before allocating any memory. Also only set/remove the ZEND_ACC_HEAP_RT_CACHE flag after allocating memory. Fixes GH-12073 Closes GH-12074
show more ...
|
Revision tags: php-8.1.7RC1, php-8.1.4RC1 |
|
#
19063a84 |
| 17-Feb-2022 |
Ilija Tovilo |
Fix null static_variable_ptr for uncalled fake closures Closes GH-8083 Closes GH-8109 |
Revision tags: php-8.1.3 |
|
#
73fed0f0 |
| 11-Feb-2022 |
Dmitry Stogov |
Fix emory leak Fixes oss-fuzz #44408 |
Revision tags: php-8.1.2RC1, php-8.1.0, php-7.3.33, php-7.3.32, php-7.3.31 |
|
#
2cc47a04 |
| 27-Aug-2021 |
Nikita Popov |
Merge branch 'PHP-8.0' * PHP-8.0: Fix Closure::call() on internal method closure
|
#
2467f759 |
| 27-Aug-2021 |
Nikita Popov |
Merge branch 'PHP-7.4' into PHP-8.0 * PHP-7.4: Fix Closure::call() on internal method closure
|
#
eda9f5f7 |
| 27-Aug-2021 |
Nikita Popov |
Fix Closure::call() on internal method closure In this case we should use the original internal handler. Otherwise the trampoline will attempt to free the closure, but the function b
Fix Closure::call() on internal method closure In this case we should use the original internal handler. Otherwise the trampoline will attempt to free the closure, but the function being used is not actually part of a closure anymore.
show more ...
|
#
4fcf0db6 |
| 27-Aug-2021 |
Nikita Popov |
Fix use after free when rebinding __call closure We would end up freeing the function name twice here, once for the original closure, and once for the rebound one. Rather than f
Fix use after free when rebinding __call closure We would end up freeing the function name twice here, once for the original closure, and once for the rebound one. Rather than further special casing the zend_closure_call_magic case, always addref the function_name for internal functions, the same we do for userland functions. To compensate, we need to release the original function name when creating from callable or call frame. Fixes oss-fuzz #37695.
show more ...
|
Revision tags: php-7.3.30 |
|
#
a8926474 |
| 23-Jul-2021 |
Nikita Popov |
Set called_scope in __callStatic closure trampoline |
#
814a9327 |
| 16-Jul-2021 |
Nikita Popov |
Add ZEND_ACC_NOT_SERIALIZABLE flag This prevents serialization and unserialization of a class and its children in a way that does not depend on the zend_class_serialize_deny and zend
Add ZEND_ACC_NOT_SERIALIZABLE flag This prevents serialization and unserialization of a class and its children in a way that does not depend on the zend_class_serialize_deny and zend_class_unserialize_deny handlers that will be going away in PHP 9 together with the Serializable interface. In stubs, `@not-serializable` can be used to set this flag. This patch only uses the new flag for a handful of Zend classes, converting the remainder is left for later. Closes GH-7249. Fixes bug #81111.
show more ...
|
Revision tags: php-7.3.29 |
|
#
d0b09a7b |
| 20-May-2021 |
Joe Watkins |
Add first-class callables Support acquiring a Closure to a callable using the syntax func(...), $obj->method(...), etc. This is essentially a shortcut for Closure::fromCallable().
Add first-class callables Support acquiring a Closure to a callable using the syntax func(...), $obj->method(...), etc. This is essentially a shortcut for Closure::fromCallable(). RFC: https://wiki.php.net/rfc/first_class_callable_syntax Closes GH-7019. Co-Authored-By: Nikita Popov <nikita.ppv@gmail.com>
show more ...
|
#
6a9daafe |
| 08-Jul-2021 |
Joe Watkins |
Fix bug #81237 comparison of fake closures doesn't work |
#
ab353a50 |
| 09-Jul-2021 |
Nikita Popov |
Don't handle unnamed arg in closure debug info Since PHP 8, we should no longer have any unnamed arguments. Don't check for this case. |
#
531413f8 |
| 25-May-2021 |
Joe Watkins |
Merge branch 'PHP-8.0' * PHP-8.0: Fix #81076 Invalid implicit binds cause incorrect count in static vars of closure debug info
|
#
213063f6 |
| 24-May-2021 |
Joe Watkins |
Fix #81076 Invalid implicit binds cause incorrect count in static vars of closure debug info |
#
008bfcc7 |
| 14-May-2021 |
Nikita Popov |
Use NO_DYNAMIC_PROPERTIES for Closure Instead of manually implementing this, use the standard mechanism. This has minor behavior changes (e.g. doing an isset() will now return false
Use NO_DYNAMIC_PROPERTIES for Closure Instead of manually implementing this, use the standard mechanism. This has minor behavior changes (e.g. doing an isset() will now return false instead of throwing) which are more in line with typical behavior.
show more ...
|
Revision tags: php-7.3.28 |
|
#
559c3f6d |
| 16-Apr-2021 |
twosee |
Merge branch 'PHP-8.0' * PHP-8.0: Fixed bug #80929
|
#
09f55604 |
| 16-Apr-2021 |
twosee |
Merge branch 'PHP-7.4' into PHP-8.0 * PHP-7.4: Fixed bug #80929
|
#
c0b1bdcd |
| 15-Apr-2021 |
twosee |
Fixed bug #80929 The function name should be kept if Closure was created from the function which is marked as ZEND_ACC_CALL_VIA_TRAMPOLINE, because it is not a one-time thing and it may be c
Fixed bug #80929 The function name should be kept if Closure was created from the function which is marked as ZEND_ACC_CALL_VIA_TRAMPOLINE, because it is not a one-time thing and it may be called multiple times. Closes GH-6867.
show more ...
|
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 ...
|
#
5caf29a0 |
| 24-Feb-2021 |
Dmitry Stogov |
Switch few functions useful in Symphony apps to new ZPP API. |
#
f37fe68e |
| 20-Feb-2021 |
Nikita Popov |
Fix closure GC handler for fake closures Fixes oss-fuzz #31135. |
#
59590663 |
| 20-Feb-2021 |
Dmitry Stogov |
Fixed NULL pointer dereference |
#
6b0f14fe |
| 17-Feb-2021 |
Nikita Popov |
Fixed bug #75474 For fake closures, we need to share static variables with the original function, not work on a separate copy. Calling a function through Closure::fromCallable() shou
Fixed bug #75474 For fake closures, we need to share static variables with the original function, not work on a separate copy. Calling a function through Closure::fromCallable() should have the same behavior as calling it directly.
show more ...
|
#
6ce70447 |
| 12-Feb-2021 |
Máté Kocsis |
Generate zend class entries based on stubs Closes GH-6685 |
#
3e01f5af |
| 15-Jan-2021 |
Nikita Popov |
Replace zend_bool uses with bool We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool
Replace zend_bool uses with bool We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
show more ...
|