#
144d2ee2 |
| 25-Oct-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-16588: UAF in Observer->serialize Closes GH-16600.
|
#
12c987fa |
| 17-Oct-2024 |
Ilija Tovilo |
Fix use-after-free in SplObjectStorage::setInfo() Fixes GH-16479 Closes GH-16482
|
#
0d4e0c01 |
| 06-Jul-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-14639: Member access within null pointer in ext/spl/spl_observer.c `spl_object_storage_attach_handle` creates an entry already, but only fills it in at the end with `spl_object_st
Fix GH-14639: Member access within null pointer in ext/spl/spl_observer.c `spl_object_storage_attach_handle` creates an entry already, but only fills it in at the end with `spl_object_storage_create_element` which allocates memory. In this case the allocation fails and we're left with a NULL slot. Doing the allocation first isn't an option because we want to check whether the slot is occupied before allocating memory. The simplest solution is to set the entry to NULL and check for a NULL pointer upon destruction. Closes GH-14849.
show more ...
|
#
80941042 |
| 09-Jun-2024 |
Gina Peter Banyard |
ext/spl: Refactor debug handlers Mainly to use zend_mangle_property_name() directly instead of spl_gen_private_prop_name()
|
#
54047c10 |
| 09-Jun-2024 |
Gina Peter Banyard |
ext/spl: Remove some useless header includes and clarify usages
|
#
a5cacba6 |
| 08-Jun-2024 |
Gina Peter Banyard |
ext/spl: Remove spl_engine.h header (#14418) And convert calls to spl_instantiate_arg_* to the new object_init_with_constructor() API
|
#
fd2d8696 |
| 08-Jun-2024 |
Gina Peter Banyard |
Clean-up some more headers (#14416) Remove unused headers (such as php_ini.h for extensions that don't define INI settings) Use more specific headers when possible
|
#
c461b600 |
| 24-May-2024 |
Levi Morrison |
refactor: change `zend_is_true` to return `bool` (#14301) Previously this returned `int`. Many functions actually take advantage of the fact this returns exactly 0 or 1. For instance,
refactor: change `zend_is_true` to return `bool` (#14301) Previously this returned `int`. Many functions actually take advantage of the fact this returns exactly 0 or 1. For instance, `main/streams/xp_socket.c` does: sockopts |= STREAM_SOCKOP_IPV6_V6ONLY_ENABLED * zend_is_true(tmpzval); And `Zend/zend_compile.c` does: child = &ast->child[2 - zend_is_true(zend_ast_get_zval(ast->child[0]))]; I changed a few places trivially from `int` to `bool`, but there are still many places such as the object handlers which return `int` that should eventually be `bool`.
show more ...
|
#
8e62e2b8 |
| 22-May-2024 |
Cristian Rodríguez |
Mark multple functions as static (#13864) * Mark many functions as static Multiple functions are missing the static qualifier. * remove unused struct sigactions st
Mark multple functions as static (#13864) * Mark many functions as static Multiple functions are missing the static qualifier. * remove unused struct sigactions struct sigaction act, old_term, old_quit, old_int; all unused. * optimizer: minXOR and maxXOR are unused
show more ...
|
#
f97bd071 |
| 05-May-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Implement SeekableIterator for SplObjectStorage (#13665)
|
#
a648365f |
| 10-Mar-2024 |
Gina Peter Banyard |
ext/spl: Throw TypeError when overloaded SplObjectStorage::getHash() method does not return a string
|
#
0de88dfb |
| 28-Feb-2024 |
Gina Peter Banyard |
ext/spl: mark all zend_object_handlers as static (#13547)
|
#
90047253 |
| 26-Feb-2023 |
Marcos Marcolin <48370677+marcosmarcolin@users.noreply.github.com> |
chore: standardize the visibility of functions. (#10708) Co-authored-by: Marcos Marcolin <marcos@ixcsoft.com.br>
|
#
a01dd9fe |
| 14-Sep-2022 |
Bob Weinand |
Revert "Port all internally used classes to use default_object_handlers" This reverts commit 94ee4f9834743ca74f6c9653863273277ce6c61a. The commit was a bit too late to be included i
Revert "Port all internally used classes to use default_object_handlers" This reverts commit 94ee4f9834743ca74f6c9653863273277ce6c61a. The commit was a bit too late to be included in PHP 8.2 RC1. Given it's a massive ABI break, we decide to postpone the change to PHP 8.3.
show more ...
|
Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23 |
|
#
94ee4f98 |
| 24-Aug-2022 |
Bob Weinand |
Port all internally used classes to use default_object_handlers Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
|
#
bc4c0126 |
| 24-Aug-2022 |
Máté Kocsis |
Declare ext/standard constants in stubs - part 1 (#9404) |
Revision tags: php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3 |
|
#
b73f139c |
| 02-Aug-2022 |
Máté Kocsis |
Declare ext/spl constants in stubs (#9226) |
Revision tags: php-8.2.0beta2, php-8.1.9, php-8.0.22, php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1 |
|
#
4df3dd76 |
| 08-Jul-2022 |
Arnaud Le Blanc |
Reduce memory allocated by var_export, json_encode, serialize, and other (#8902) smart_str uses an over-allocated string to optimize for append operations. Functions that use smart_str tend
Reduce memory allocated by var_export, json_encode, serialize, and other (#8902) smart_str uses an over-allocated string to optimize for append operations. Functions that use smart_str tend to return the over-allocated string directly. This results in unnecessary memory usage, especially for small strings. The overhead can be up to 231 bytes for strings smaller than that, and 4095 for other strings. This can be avoided for strings smaller than `4096 - zend_string header size - 1` by reallocating the string. This change introduces `smart_str_trim_to_size()`, and calls it in `smart_str_extract()`. Functions that use `smart_str` are updated to use `smart_str_extract()`. Fixes GH-8896
show more ...
|
Revision tags: 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 |
|
#
cfc38a60 |
| 13-Apr-2022 |
George Peter Banyard |
SPL: minor refactoring (#8341) Use more appropriate types and return macros |
Revision tags: 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 |
|
#
024d5f4b |
| 01-Dec-2021 |
Tyson Andre |
Cache method overrides of ArrayAccess in zend_class_entry Previously, code such as subclasses of SplFixedArray would check for method overrides when instantiating the objects. T
Cache method overrides of ArrayAccess in zend_class_entry Previously, code such as subclasses of SplFixedArray would check for method overrides when instantiating the objects. This optimization was mentioned as a followup to GH-6552
show more ...
|
Revision tags: php-7.4.27RC1 |
|
#
032de9e0 |
| 26-Nov-2021 |
Tyson Andre |
Optimize SplObjectStorage native read/write/has/unset dimension handlers This makes reading/writing with `$splObjectStorage[$offset]` shorthand twice as fast as it was previously, and a
Optimize SplObjectStorage native read/write/has/unset dimension handlers This makes reading/writing with `$splObjectStorage[$offset]` shorthand twice as fast as it was previously, and a bit faster than offsetGet/offsetSet instead of (previously) much slower. Call destructor after overriding old SplObjectStorage entry. Previously, it was called before, which was possibly unsafe if the destructor had side effects. Add tests. Closes GH-7695 Related to GH-7690 Check for ref in SplObjectStorage->__unserialize, check for ref. SplObjectStorage->unserialize may be a different cause of references for malformed inputs, so continue checking In internally used methods, convert references to non-references if they're found.
show more ...
|
Revision tags: php-8.1.0, php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6, 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 |
|
#
d0dbf729 |
| 24-Sep-2021 |
Nikita Popov |
Initialize iterator_funcs_ptr upfront Same as we do for the IteratorAggregate case, initialize the Iterator methods upfront. This is preparation for an upcoming change to automatical
Initialize iterator_funcs_ptr upfront Same as we do for the IteratorAggregate case, initialize the Iterator methods upfront. This is preparation for an upcoming change to automatically determine whether get_iterator can be reused in a child class, in the same way we already do for IteratorAggregate.
show more ...
|
Revision tags: 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 |
|
#
6d505d44 |
| 22-Jul-2021 |
Nikita Popov |
Add RETURN/RETVAL_COPY_DEREF() macros These were missing from the set... I think quite a few of these usages don't actually need the DEREF, but I've just kept things as is for n
Add RETURN/RETVAL_COPY_DEREF() macros These were missing from the set... I think quite a few of these usages don't actually need the DEREF, but I've just kept things as is for now.
show more ...
|
Revision tags: php-8.1.0beta1 |
|
#
42cb5b5f |
| 14-Jul-2021 |
Nikita Popov |
Throw from MultipleIterator::key/current() for invalid iterator Calling current()/key() on an invalid iterator is an error condition. Throw instead of returning false. |
#
58f3f751 |
| 14-Jul-2021 |
Nikita Popov |
Throw from SplObjectStorage::current() for invalid iterator Accessing key()/current() on an invalid iterator is an error condition. Throw instead of returning null. |