#
c65e042c |
| 16-Sep-2024 |
Arnaud Le Blanc |
Fix zend_get_property_info_for_slot() for lazy objects (#15855) zend_get_property_info_for_slot(obj, slot) assumes that 'slot' belongs to 'obj', but that may not be the case for lazy proxies
Fix zend_get_property_info_for_slot() for lazy objects (#15855) zend_get_property_info_for_slot(obj, slot) assumes that 'slot' belongs to 'obj', but that may not be the case for lazy proxies. Fortunately, the property info is often already available in path when it is needed. For other cases, I make zend_get_property_info_for_slot() aware of lazy objects, and add zend_get_property_info_for_slot_self() for cases where the 'slot' is known to belong to the object itself. Fixes oss-fuzz #71446
show more ...
|
#
58aa6fc8 |
| 19-May-2023 |
Arnaud Le Blanc |
Lazy objects RFC: https://wiki.php.net/rfc/lazy-objects Closes GH-15019
|
#
39b8d5c8 |
| 06-Mar-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-13612: Corrupted memory in destructor with weak references Inside `zend_object_std_dtor` the weakrefs are notified after the destruction of properties already took place. In this
Fix GH-13612: Corrupted memory in destructor with weak references Inside `zend_object_std_dtor` the weakrefs are notified after the destruction of properties already took place. In this test case, the destructor of an anon class will be invoked due to the property destruction. That class has a weak reference to its parent. This means that the destructor can access parent properties that already have been destroyed, resulting in a UAF. Fix this by notifying the weakrefs at the start of the object's destruction. Closes GH-13613.
show more ...
|
#
53aa53f4 |
| 24-Aug-2023 |
Jakub Zelenka |
Introduce Zend guard recursion protection This PR introduces a new way of recursion protection in JSON, var_dump and friends. It fixes issue in master for __debugInfo and also improves
Introduce Zend guard recursion protection This PR introduces a new way of recursion protection in JSON, var_dump and friends. It fixes issue in master for __debugInfo and also improves perf for jsonSerializable in some cases. More info can be found in GH-10020. Closes GH-11812
show more ...
|
#
3bcf2c37 |
| 28-Feb-2023 |
Máté Kocsis |
Allow readonly properties to be reinitialized once during cloning (#10389) RFC: https://wiki.php.net/rfc/readonly_amendments
|
#
bf1cfc07 |
| 16-Jan-2023 |
Christoph M. Becker |
Revert GH-10300 Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816>. This reverts commit 68ada76f9a659745f572539b72afa06fa75a866f. his reverts commit 45384c6
Revert GH-10300 Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816>. This reverts commit 68ada76f9a659745f572539b72afa06fa75a866f. his reverts commit 45384c6e201eda9963e2fcc18946a9446230a2d6. This reverts commit ef7fbfd71025f034b0bfcb413efd181ce798fc1b. This reverts commit 9b9ea0d7c696f2990a159b2a2dafbc04547dc10f. This reverts commit f15747c26be4a2330dc0cf3ea442f53f30f84cac. This reverts commit e883ba93c40827fafd7868517eb48e04569f76ab. This reverts commit 7e87551c3775d26e20b06a4032a00053db6452cc. This reverts commit 921274d2b8966641a00c0a767ae40ba7187bdffc. This reverts commit fc1f528e5e3ee45ab17ae8dcfad6a6422ff2002d. This reverts commit 0961715cdafb5d39124667ff94f3b56453ce71f1. This reverts commit a93f264526e1cdade71d887800c1c448c411bfdc. This reverts commit 72dd94e1c6d29203b8f6473317f626e6d6d6fbdc. This reverts commit 29b2dc89645e741f91cc920964432dccd2aaef14. This reverts commit 05c7653bba7571852f5ce6fc0d220a1a829bc4c0. This reverts commit 5190e5c260ee05e3f3c3d1168263a1a6637441d0. This reverts commit 6b55bf228cb2da8705737d414f394950a92d8aae. This reverts commit 184b4a12d3215d105720d005b31e365249e2eb21. This reverts commit 4c31b7888a561e920fd3889ba8d99368f3c2d9e6. This reverts commit d44e9680f080b4918cfed268b96f90ea35975617. This reverts commit 4069a5c43f419d76e1254c8e49b4cad9968a408f.
show more ...
|
#
f15747c2 |
| 04-Jan-2023 |
Max Kellermann |
Zend/zend_objects: include cleanup
|
#
5a0b68be |
| 14-Sep-2022 |
Bob Weinand |
Revert "Store default object handlers alongside the class entry" This reverts commit 9e6eab3c139b41dc976dd5305fd1a6e387e5e27f. Reverted along a01dd9fedaecd2e5b95bc5c2e8d6542116addea
Revert "Store default object handlers alongside the class entry" This reverts commit 9e6eab3c139b41dc976dd5305fd1a6e387e5e27f. Reverted along a01dd9fedaecd2e5b95bc5c2e8d6542116addeae.
show more ...
|
Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23, php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3, php-8.2.0beta2, php-8.1.9, php-8.0.22 |
|
#
9e6eab3c |
| 22-Jul-2022 |
Bob Weinand |
Store default object handlers alongside the class entry Object handlers being separate from class entries is a legacy inherited from PHP 5. Today it has little benefit to keep them separate:
Store default object handlers alongside the class entry Object handlers being separate from class entries is a legacy inherited from PHP 5. Today it has little benefit to keep them separate: in fact, accessing object handlers usually requires not-so-safe hacks. While it is possible to swap handlers in a custom installed create_object handler, this mostly is tedious, as well as it requires allocating the object handlers struct at runtime, possibly caching it etc.. This allows extensions, which intend to observe other classes to install their own class handlers. The life cycle of internal classes may now be simply observed by swapping the class handlers in post_startup stage. The life cycle of userland classes may be observed by iterating over the new classes in zend_compile_file and zend_compile_string and then swapping their handlers. In general, this would also be a first step in directly tying the object handlers to classes. Especially given that I am not aware of any case where the object handlers would be different between various instances of a given class. Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
show more ...
|
Revision tags: php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1, php-8.0.21, php-8.1.8, php-8.2.0alpha3, php-8.1.8RC1, php-8.2.0alpha2, php-8.0.21RC1, php-8.0.20, php-8.1.7, php-8.2.0alpha1, php-7.4.30, php-8.1.7RC1, php-8.0.20RC1, php-8.1.6, php-8.0.19, php-8.1.6RC1, php-8.0.19RC1, php-8.0.18, php-8.1.5, php-7.4.29, php-8.1.5RC1, php-8.0.18RC1, php-8.1.4, php-8.0.17, php-8.1.4RC1, php-8.0.17RC1, php-8.1.3, php-8.0.16, php-7.4.28, php-8.1.3RC1, php-8.0.16RC1, php-8.1.2, php-8.0.15, php-8.1.2RC1, php-8.0.15RC1, php-8.0.14, php-8.1.1, php-7.4.27, php-8.1.1RC1, php-8.0.14RC1, php-7.4.27RC1, php-8.1.0, php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6 |
|
#
90b7bde6 |
| 03-Nov-2021 |
Dmitry Stogov |
Use more compact representation for packed arrays. - for packed arrays we store just an array of zvals without keys. - the elements of packed array are accessible throuf as ht->arPacked[
Use more compact representation for packed arrays. - for packed arrays we store just an array of zvals without keys. - the elements of packed array are accessible throuf as ht->arPacked[i] instead of ht->arData[i] - in addition to general ZEND_HASH_FOREACH_* macros, we introduced similar familied for packed (ZEND_HASH_PACKED_FORECH_*) and real hashes (ZEND_HASH_MAP_FOREACH_*) - introduced an additional family of macros to access elements of array (packed or real hashes) ZEND_ARRAY_ELEMET_SIZE, ZEND_ARRAY_ELEMET_EX, ZEND_ARRAY_ELEMET, ZEND_ARRAY_NEXT_ELEMENT, ZEND_ARRAY_PREV_ELEMENT - zend_hash_minmax() prototype was changed to compare only values Because of smaller data set, this patch may show performance improvement on some apps and benchmarks that use packed arrays. (~1% on PHP-Parser) TODO: - sapi/phpdbg needs special support for packed arrays (WATCH_ON_BUCKET). - zend_hash_sort_ex() may require converting packed arrays to hash.
show more ...
|
Revision tags: php-7.4.26RC1, php-8.0.13RC1, php-8.1.0RC5, php-7.3.32, php-7.4.25, php-8.0.12, php-8.1.0RC4, php-8.0.12RC1, php-7.4.25RC1, php-8.1.0RC3, php-8.0.11, php-7.4.24, php-7.3.31, php-8.1.0RC2, php-7.4.24RC1, php-8.0.11RC1, php-8.1.0RC1, php-7.4.23, php-8.0.10, php-7.3.30, php-8.1.0beta3, php-8.0.10RC1, php-7.4.23RC1, php-8.1.0beta2, php-8.0.9, php-7.4.22, php-8.1.0beta1, php-7.4.22RC1, php-8.0.9RC1, php-8.1.0alpha3, php-7.4.21, php-7.3.29, php-8.0.8, php-8.1.0alpha2, php-7.4.21RC1, php-8.0.8RC1, php-8.1.0alpha1, php-8.0.7, php-7.4.20, php-8.0.7RC1, php-7.4.20RC1, php-8.0.6, php-7.4.19, php-7.4.18, php-7.3.28, php-8.0.5 |
|
#
08dafda1 |
| 19-Apr-2021 |
Dmitry Stogov |
Fixed use-after-free introduced by ca49e53670631ed9754810d7ec6d56ede0d06cca
|
#
ca49e536 |
| 15-Apr-2021 |
Dmitry Stogov |
Stop inserting fake frames on VM stack. Now similar "fake" frames now materialized when fetching debug backtraces. The patch also fixes few incorrect backtraces for generators in *.p
Stop inserting fake frames on VM stack. Now similar "fake" frames now materialized when fetching debug backtraces. The patch also fixes few incorrect backtraces for generators in *.phpt tests.
show more ...
|
Revision tags: php-8.0.5RC1, php-7.4.18RC1, php-8.0.4RC1, php-7.4.17RC1, php-8.0.3, php-7.4.16, php-8.0.3RC1, php-7.4.16RC1, php-8.0.2, php-7.4.15, php-7.3.27, php-8.0.2RC1, php-7.4.15RC2, php-7.4.15RC1, php-8.0.1, php-7.4.14, php-7.3.26, php-7.4.14RC1, php-8.0.1RC1, php-7.3.26RC1, php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1, php-7.4.12, php-8.0.0RC3, php-7.3.24, php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1, php-7.2.34, php-8.0.0rc1, php-7.4.11, php-7.3.23, php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1, php-8.0.0beta3, php-7.4.10, php-7.3.22, php-8.0.0beta2, php-7.3.22RC1, php-7.4.10RC1, php-8.0.0beta1, php-7.4.9, php-7.2.33, php-7.3.21, php-8.0.0alpha3, php-7.4.9RC1, php-7.3.21RC1, php-7.4.8, php-7.2.32, php-8.0.0alpha2, php-7.3.20, php-8.0.0alpha1, php-7.4.8RC1, php-7.3.20RC1, php-7.4.7, php-7.3.19 |
|
#
d30cd7d7 |
| 26-May-2020 |
Máté Kocsis |
Review the usage of apostrophes in error messages Closes GH-5590
|
#
bb3d4456 |
| 15-Jun-2020 |
Dmitry Stogov |
Change GC_COLLECTABLE flag into GC_NOT_COLLECTABLE to simplify GC_MAY_LEAK() check
|
#
e56e53a5 |
| 09-Jun-2020 |
Nikita Popov |
Back up fake_scope in zend_call_function We regularly find new places where we forgot to reset fake_scope. Instead of having to handle this for each caller of zend_call_function() an
Back up fake_scope in zend_call_function We regularly find new places where we forgot to reset fake_scope. Instead of having to handle this for each caller of zend_call_function() and similar APIs, handle it directly in zend_call_function().
show more ...
|
#
257dbb04 |
| 08-Jun-2020 |
Nikita Popov |
Add zend_call_known_function() API family This adds the following APIs: void zend_call_known_function( zend_function *fn, zend_object *object, zend_class_entry *called_scope
Add zend_call_known_function() API family This adds the following APIs: void zend_call_known_function( zend_function *fn, zend_object *object, zend_class_entry *called_scope, zval *retval_ptr, int param_count, zval *params); void zend_call_known_instance_method( zend_function *fn, zend_object *object, zval *retval_ptr, int param_count, zval *params); void zend_call_known_instance_method_with_0_params( zend_function *fn, zend_object *object, zval *retval_ptr); void zend_call_known_instance_method_with_1_params( zend_function *fn, zend_object *object, zval *retval_ptr, zval *param); void zend_call_known_instance_method_with_2_params( zend_function *fn, zend_object *object, zval *retval_ptr, zval *param1, zval *param2); These are used to perform a call if you already have the zend_function you want to call. zend_call_known_function() is the base API, the rest are just really thin wrappers around it for the common case of instance method calls. Closes GH-5692.
show more ...
|
Revision tags: php-7.4.7RC1, php-7.3.19RC1, php-7.4.6, php-7.2.31, php-7.4.6RC1, php-7.3.18RC1, php-7.2.30, php-7.4.5, php-7.3.17, php-7.4.5RC1, php-7.3.17RC1, php-7.3.18, php-7.4.4, php-7.2.29, php-7.3.16, php-7.4.4RC1, php-7.3.16RC1, php-7.4.3, php-7.2.28, php-7.3.15RC1, php-7.4.3RC1, php-7.3.15, php-7.2.27, php-7.4.2, php-7.3.14, php-7.3.14RC1, php-7.4.2RC1, php-7.4.1, php-7.2.26, php-7.3.13, php-7.4.1RC1, 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 |
|
#
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 ...
|
Revision tags: 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, php-7.2.23, php-7.3.10 |
|
#
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.
|
Revision tags: php-7.4.0RC2, php-7.2.23RC1, php-7.3.10RC1, php-7.4.0RC1, php-7.1.32, php-7.2.22, php-7.3.9, php-7.4.0beta4, php-7.2.22RC1, php-7.3.9RC1 |
|
#
18f2918a |
| 13-Aug-2019 |
Nikita Popov |
Don't destroy properties array with unset GC type As the properties array can also be a GC root, it might have already been destroyed.
|
Revision tags: php-7.4.0beta2, php-7.1.31, php-7.2.21, php-7.3.8, php-7.4.0beta1, php-7.2.21RC1, php-7.3.8RC1, php-7.4.0alpha3, php-7.3.7, php-7.2.20, php-7.4.0alpha2, php-7.3.7RC3, php-7.3.7RC2, php-7.2.20RC2, php-7.4.0alpha1, php-7.3.7RC1, php-7.2.20RC1, php-7.2.19, php-7.3.6, php-7.1.30, 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, php-7.3.3RC1, php-7.2.16RC1, php-7.2.15, php-7.3.2, php-7.2.15RC1, php-7.3.2RC1, php-5.6.40, php-7.1.26, php-7.3.1, php-7.2.14, php-7.2.14RC1, php-7.3.1RC1, php-5.6.39, php-7.1.25, php-7.2.13, php-7.0.33, php-7.3.0, php-7.1.25RC1, php-7.2.13RC1, php-7.3.0RC6, php-7.1.24, php-7.2.12, php-7.3.0RC5, php-7.1.24RC1, php-7.2.12RC1, php-7.3.0RC4, php-7.1.23, php-7.2.11, php-7.3.0RC3, php-7.1.23RC1, php-7.2.11RC1, php-7.3.0RC2, php-5.6.38, php-7.1.22, php-7.3.0RC1, php-7.2.10, php-7.0.32, php-7.1.22RC1, php-7.3.0beta3, php-7.2.10RC1, php-7.1.21, php-7.2.9, php-7.3.0beta2, php-7.1.21RC1, php-7.3.0beta1, php-7.2.9RC1, php-5.6.37, php-7.1.20, php-7.3.0alpha4, php-7.0.31, php-7.2.8, php-7.1.20RC1, php-7.2.8RC1, php-7.3.0alpha3, php-7.3.0alpha2, php-7.1.19, php-7.2.7, php-7.1.19RC1, php-7.3.0alpha1, php-7.2.7RC1, php-7.1.18, php-7.2.6 |
|
#
6529d7ac |
| 10-May-2018 |
Joe Watkins |
zend_weakrefs
|
#
91ef4124 |
| 31-Jan-2019 |
Dmitry Stogov |
Refactor zend_object_handlers API to pass zend_object* and zend_string* insted of zval(s).
|
#
92ac598a |
| 22-Jan-2019 |
Peter Kokot |
Remove local variables This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly
Remove local variables This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly used by Vim and Emacs editors yet with recent changes the once working definitions don't work anymore in Vim without custom plugins or additional configuration. Neither are these settings synced across the PHP code base. A simpler and better approach is EditorConfig and fixing code using some code style fixing tools in the future instead. This patch also removes the so called modelines for Vim. Modelines allow Vim editor specifically to set some editor configuration such as syntax highlighting, indentation style and tab width to be set in the first line or the last 5 lines per file basis. Since the php test files have syntax highlighting already set in most editors properly and EditorConfig takes care of the indentation settings, this patch removes these as well for the Vim 6.0 and newer versions. With the removal of local variables for certain editors such as Emacs and Vim, the footer is also probably not needed anymore when creating extensions using ext_skel.php script. Additionally, Vim modelines for setting php syntax and some editor settings has been removed from some *.phpt files. All these are mostly not relevant for phpt files neither work properly in the middle of the file.
show more ...
|
#
a81202ac |
| 30-Jan-2019 |
Zeev Suraski |
Adios, yearly copyright ranges
|
#
02557f87 |
| 30-Jan-2019 |
Zeev Suraski |
Adios, yearly copyright ranges
|
#
e219ec14 |
| 07-Jan-2019 |
Nikita Popov |
Implement typed properties RFC: https://wiki.php.net/rfc/typed_properties_v2 This is a squash of PR #3734, which is a squash of PR #3313. Co-authored-by: Bob Weinand <bobwe
Implement typed properties RFC: https://wiki.php.net/rfc/typed_properties_v2 This is a squash of PR #3734, which is a squash of PR #3313. Co-authored-by: Bob Weinand <bobwei9@hotmail.com> Co-authored-by: Joe Watkins <krakjoe@php.net> Co-authored-by: Dmitry Stogov <dmitry@zend.com>
show more ...
|