History log of /PHP-8.2/ext/spl/spl_fixedarray.c (Results 1 – 25 of 185)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 97267215 10-Jan-2024 David CARLIER

general signatures discrepencies fixes (#13122)


# 4cfc8f6d 29-Oct-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Remove dead stores from ext/spl (#12550)


# 009d48da 08-Oct-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Convert bounds exception in SplFixedArray to OutOfBoundsException instead of RuntimeException (#12383)


# d5ad7510 08-Jun-2023 George Peter Banyard

More usage of known zend_str instead of C string (#11381)


# 99fa740a 06-Jun-2023 George Peter Banyard

Use common function for TypeError on illegal offset access (#10544)

This merges all usages of emitting an offset TypeError into a new ZEND_API function
zend_illegal_container_offset(cons

Use common function for TypeError on illegal offset access (#10544)

This merges all usages of emitting an offset TypeError into a new ZEND_API function
zend_illegal_container_offset(const zend_string* container, const zval *offset, int type);

Where the container should represent the type on which the access is attempted (e.g. string, array)
The offset zval that is used, where the error message will display its type
The type of access, which should be a BP_VAR_* constant, to get special message for isset/empty/unset

show more ...


# 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>


# 641fe23e 08-Feb-2023 Marcos Marcolin <48370677+marcosmarcolin@users.noreply.github.com>

Improve illegal offset error messages (#10504)

Co-authored-by: Marcos Marcolin <marcos@ixcsoft.com.br>


# c4ecd82f 24-Oct-2022 Tyson Andre

Make inspecting SplFixedArray instances more memory efficient/consistent, change print_r null props handling (#9757)

* Make handling of SplFixedArray properties more consistent

Crea

Make inspecting SplFixedArray instances more memory efficient/consistent, change print_r null props handling (#9757)

* Make handling of SplFixedArray properties more consistent

Create a brand new reference counted array every time in SplFixedArray
to be freed by the callers (or return null).
Switch from overriding `get_properties` to overriding `get_properties_for` handler

* Print objects with null hash table like others in print_r

Noticed when working on subsequent commits for SplFixedArray.
Make whether zend_get_properties_for returns null or an empty array
invisible to the end user - it would be always be a non-null array for
user-defined classes.
Always print newlines with `\n\s*(\n\s*)` after objects

Noticed when working on SplFixedArray changes, e.g. in
ext/spl/tests/SplFixedArray__construct_param_null.phpt

show more ...


# b71c6b2c 13-Aug-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix #81992: SplFixedArray::setSize() causes use-after-free

Upon resizing, the elements are destroyed from lower index to higher
index. When an element refers to an object with a destruct

Fix #81992: SplFixedArray::setSize() causes use-after-free

Upon resizing, the elements are destroyed from lower index to higher
index. When an element refers to an object with a destructor, it can
refer to a lower (i.e. already destroyed) element, causing a uaf.
Set refcounted zvals to NULL after destroying them to avoid a uaf.

Closes GH-11959.

show more ...


# 47b3fe47 24-Mar-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Handle indirect zvals and use up-to-date properties in SplFixedArray::__serialize

Closes GH-10925.


# 0d524eda 27-Mar-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Revert "Handle indirect zvals in SplFixedArray::__serialize"

This reverts commit e6989382296250b1983422c0b8730cd773f26ea7.


# e6989382 24-Mar-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Handle indirect zvals in SplFixedArray::__serialize

Closes GH-10925.


# a0826966 22-Mar-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-10907: Unable to serialize processed SplFixedArrays in PHP 8.2.4

The properties table can also contain numeric entries after a rebuild of
the table based on the array. Since the a

Fix GH-10907: Unable to serialize processed SplFixedArrays in PHP 8.2.4

The properties table can also contain numeric entries after a rebuild of
the table based on the array. Since the array can only contain numeric
entries, and the properties table can contain a mix of both, we'll add
the numeric entries from the array and only the string entries from the
properties table. To implement this we simply check if the key from the
properties table is a string.

Closes GH-10921.

show more ...


# 70ad93dd 15-Sep-2022 Nikita Popov

Fix serialization of empty SplFixedArray

Avoid null pointer deref.


# d1fc0017 14-Sep-2022 Bob Weinand

Revert "Fix compilation on MacOS"

This reverts commit 800c6672e57a01d68dcaba36f8f7d65c6871aafc.

Reverted along with a01dd9fedaecd2e5b95bc5c2e8d6542116addeae.


# 800c6672 24-Aug-2022 Bob Weinand

Fix compilation on MacOS

memrchr has an always available equivalent under the name of zend_memrchr.

Signed-off-by: Bob Weinand <bobwei9@hotmail.com>


# adb45a63 30-Aug-2022 Máté Kocsis

Fix GH-9186 @strict-properties can be bypassed using unserialization (#9354)

* Emit deprecation warnings when adding dynamic properties to classes during unserialization - this will become a

Fix GH-9186 @strict-properties can be bypassed using unserialization (#9354)

* Emit deprecation warnings when adding dynamic properties to classes during unserialization - this will become an Error in php 9.0.
(Adding dynamic properties in other contexts was already a deprecation warning - the use case of unserialization was overlooked)
* Throw an error when attempting to add a dynamic property to a `readonly` class when unserializing
* Add new serialization methods `__serialize`/`__unserialize` for SplFixedArray to avoid creating deprecated dynamic
properties that would then be added to the backing fixed-size array
* Don't add named dynamic/declared properties (e.g. $obj->foo) of SplFixedArray to the backing array when unserializing
* Update tests to declare properties or to expect the deprecation warning
* Add news entry

Co-authored-by: Tyson Andre <tysonandre775@hotmail.com>

show more ...


# 3b92a966 25-Jun-2022 Ilija Tovilo

Convert return type of various object handlers from int to zend_result (#8755)


# cfc38a60 13-Apr-2022 George Peter Banyard

SPL: minor refactoring (#8341)

Use more appropriate types and return macros


# cd1c6f0b 24-Feb-2022 Tyson Andre

Fixes infinite recursion introduced by patch to SplFixedArray (#8105)

Closes GH-8079

Track whether the spl_fixedarray was modified since the last call to
get_properties


# c77bbcd4 11-Feb-2022 Dmitry Stogov

Fixed GH-8041 (php 8.2.0-dev crashes with assertion for cloning/get_object_vars on non-empty SplFixedArray)


# 52ae6417 11-Feb-2022 Dmitry Stogov

Fixed GH-8044 (var_export/debug_zval_dump HT_ASSERT_RC1 debug failure for SplFixedArray)


# 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 ...


# 2d668409 21-Sep-2021 Christoph M. Becker

Fix #80663: Recursive SplFixedArray::setSize() may cause double-free

We address the `::setSize(0)` case by setting `array->element = NULL`
and `array->size = 0` before we destroy the ele

Fix #80663: Recursive SplFixedArray::setSize() may cause double-free

We address the `::setSize(0)` case by setting `array->element = NULL`
and `array->size = 0` before we destroy the elements.

Co-authored-by: Tyson Andre <tyson.andre@uwaterloo.ca>

Closes GH-7503.

show more ...


# 44489348 24-Sep-2021 Nikita Popov

Don't mark SplFixedArray as REUSE_GET_ITERATOR

This flag only has an effect (or use) for Iterators, not for
IteratorAggregates. Removing the confusing flag.


12345678