#
eb8c3cb7 |
| 08-Jul-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-14741: Segmentation fault in Zend/zend_types.h The create_obj handler of InternalIterator is overwritten, but not the clone_obj handler. This is not allowed. In PHP 8.2 this d
Fix GH-14741: Segmentation fault in Zend/zend_types.h The create_obj handler of InternalIterator is overwritten, but not the clone_obj handler. This is not allowed. In PHP 8.2 this didn't cause a segfault because the standard object handler was used for the clone instead of the internal handler. So then it allocates and frees the object using the standard object handlers. In 8.3 however, the object is created using the standard object handler and freed using the custom handler, resulting in the buffer overflow. Even though bisect points to 1e1ea4f this only reveals the bug. Closes GH-14882.
show more ...
|
#
c672a069 |
| 05-Sep-2023 |
George Peter Banyard |
Merge branch 'PHP-8.1' into PHP-8.2 * PHP-8.1: Prevents double call to internal iterator rewind handler adds failing test case for #12060
|
#
da7a66d6 |
| 27-Aug-2023 |
ju1ius |
Prevents double call to internal iterator rewind handler Closes GH-12060 Signed-off-by: George Peter Banyard <girgias@php.net> |
#
c0d49b7c |
| 19-Sep-2022 |
Dmitry Stogov |
Merge branch 'PHP-8.1' into PHP-8.2 * PHP-8.1: Fix memory leak
|
#
8a1f7fa7 |
| 19-Sep-2022 |
Dmitry Stogov |
Fix memory leak Fixes oss-fuzz #51451 |
#
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 ...
|
#
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 ...
|
#
733023b2 |
| 10-Mar-2022 |
Ilija Tovilo |
Improve error message class type Refer to interfaces/enums instead of classes in more places. Closes GH-7792 Closes GH-8187 |
#
18f15872 |
| 21-Feb-2022 |
Christoph M. Becker |
Merge branch 'PHP-8.1' * PHP-8.1: Fix GH-7958: Nested CallbackFilterIterator is leaking memory
|
#
fb70460d |
| 18-Feb-2022 |
Christoph M. Becker |
Fix GH-7958: Nested CallbackFilterIterator is leaking memory We implement `zend_object_iterator_funcs.get_gc` for user iterators to avoid the memory leak. Closes GH-8107. |
#
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 ...
|
#
d5b97362 |
| 04-Nov-2021 |
Nikita Popov |
Always initialize iterator_funcs_ptr The behavior here depending on the order in which the class entry was initialized: If get_iterator was set first and Iterator or IteratorAggregat
Always initialize iterator_funcs_ptr The behavior here depending on the order in which the class entry was initialized: If get_iterator was set first and Iterator or IteratorAggregate implemented later, we would not initialize iterator_funcs_ptr. If Iterator/IteratorAggregate were implemented first, we would initialize it. After the migration to stub-based class declarations, we always follow the latter order, but 3rd-party extension may not. To ensure that behavior is order-independent, always initialize iterator_funcs_ptr, as we have code (at least the MultipleIterator implementation) that depends on it being initialized for iterators with custom get_iterator as well.
show more ...
|
#
15bbf6f3 |
| 24-Sep-2021 |
Nikita Popov |
Automatically determine whether to reuse get_iterator() Same as with the IteratorAggregate case, allow reusing get_iterator if none of the Iterator methods are overridden. Drop the R
Automatically determine whether to reuse get_iterator() Same as with the IteratorAggregate case, allow reusing get_iterator if none of the Iterator methods are overridden. Drop the REUSE_GET_ITERATOR flag that previously allowed ArrayIterator to opt-in to unconditional get_iterator reuse, and drop the override handling it did, in favor of the automated approach.
show more ...
|
#
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 ...
|
#
858d0c09 |
| 06-Aug-2021 |
Jeremy Mikola |
Include class name in Serializable deprecation message The deprecation message was originally introduced in 3e6b447 (#6494). I first encountered this notice when testing the MongoDB
Include class name in Serializable deprecation message The deprecation message was originally introduced in 3e6b447 (#6494). I first encountered this notice when testing the MongoDB extension with PHP 8.1, which produced many duplicate messages that provided no detail about the particular class that needed to be fixed. Closes GH-7346.
show more ...
|
#
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 ...
|
#
322864b5 |
| 20-Jul-2021 |
Joe Watkins |
Drop serial denier functions |
#
3e6b4479 |
| 07-Dec-2020 |
Nikita Popov |
Partially deprecate Serializable If Serializable is implemented, require that __serialize() and __unserialize() are implemented as well, else issue a deprecation warning. Al
Partially deprecate Serializable If Serializable is implemented, require that __serialize() and __unserialize() are implemented as well, else issue a deprecation warning. Also deprecate use of PDO::FETCH_SERIALIZE. RFC: https://wiki.php.net/rfc/phase_out_serializable Closes GH-6494.
show more ...
|
#
7af3a392 |
| 15-Apr-2021 |
Nikita Popov |
Merge branch 'PHP-8.0' * PHP-8.0: Handle ref return from Iterator::key()
|
#
46f9fed0 |
| 15-Apr-2021 |
Nikita Popov |
Handle ref return from Iterator::key() Handle this in the implementation of get_current_key of user_it, so that the callers may assume that the key is not a reference. Fixes oss
Handle ref return from Iterator::key() Handle this in the implementation of get_current_key of user_it, so that the callers may assume that the key is not a reference. Fixes oss-fuzz #33018.
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 ...
|
#
3642592a |
| 21-Sep-2020 |
Nikita Popov |
Remove unnecessary check We should only produce IS_UNDEF if an exception is thrown, this check is not needed. |
#
fa8d9b11 |
| 28-Aug-2020 |
George Peter Banyard |
Improve type declarations for Zend APIs Voidification of Zend API which always succeeded Use bool argument types instead of int for boolean arguments Use bool return type for functio
Improve type declarations for Zend APIs Voidification of Zend API which always succeeded Use bool argument types instead of int for boolean arguments Use bool return type for functions which return true/false (1/0) Use zend_result return type for functions which return SUCCESS/FAILURE as they don't follow normal boolean semantics Closes GH-6002
show more ...
|
#
55798e0e |
| 26-Aug-2020 |
Nikita Popov |
Lowercase method name in zend_call_method() |