History log of /php-src/ext/spl/spl_fixedarray.c (Results 26 – 50 of 208)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
Revision tags: php-8.1.3, php-8.0.16, php-7.4.28
# 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)

# a04d1815 11-Feb-2022 Dmitry Stogov

Merge branch 'PHP-8.1'

* PHP-8.1:
Fixed GH-8044 (var_export/debug_zval_dump HT_ASSERT_RC1 debug failure for SplFixedArray)


# a584d126 11-Feb-2022 Dmitry Stogov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fixed GH-8044 (var_export/debug_zval_dump HT_ASSERT_RC1 debug failure for SplFixedArray)


# 52ae6417 11-Feb-2022 Dmitry Stogov

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

Revision tags: 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, 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
# 9800845d 28-Sep-2021 Christoph M. Becker

Merge branch 'PHP-8.1'

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


# e73cc7ae 28-Sep-2021 Christoph M. Becker

Merge branch 'PHP-8.0' into PHP-8.1

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


# 6154aa65 28-Sep-2021 Christoph M. Becker

Merge branch 'PHP-7.4' into PHP-8.0

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


Revision tags: php-8.0.11
# 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.

Revision tags: php-7.4.24, php-7.3.31, php-8.1.0RC2
# 27976d7d 14-Sep-2021 Tyson Andre

Merge branch 'PHP-8.0' into PHP-8.1


# 753645a6 14-Sep-2021 Tyson Andre

Merge remote-tracking branch 'origin/PHP-7.4' into PHP-8.0


# b053192a 14-Sep-2021 Tyson Andre

Fix #81429: Handle resizing in SplFixedArray::offsetSet (#7487)

offsetSet did not account for the fact that the array may no longer exist after
the field is overwritten. This fixes that.

Fix #81429: Handle resizing in SplFixedArray::offsetSet (#7487)

offsetSet did not account for the fact that the array may no longer exist after
the field is overwritten. This fixes that.

Add test of resizing both to the empty array and a smaller array - there should
be no valgrind warnings with a proper fix.

Alternate approach to #7486 (described in https://bugs.php.net/bug.php?id=81429)

show more ...

Revision tags: php-7.4.24RC1, php-8.0.11RC1, php-8.1.0RC1
# 5b2ddf5a 31-Aug-2021 Nikita Popov

Export zend_use_resource_as_offset()

Use a common implementation to generate this error message, as
we do so in quite a few places dealing with array keys.

Revision tags: 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, php-7.4.22RC1, php-8.0.9RC1, php-8.1.0alpha3
# b6538028 02-Jul-2021 Nikita Popov

Avoid null pointer arithmetic in SplFixedArray

Fixes bug62904.phpt under clang ubsan.

Revision tags: php-7.4.21, php-7.3.29, php-8.0.8, php-8.1.0alpha2
# e9e06279 18-Jun-2021 George Peter Banyard

Refactor SplFixedArray (#7168)

* Move spl_offset_convert_to_long() to spl_fixedarray.c

It is only used there, which explains its weird offset semantics

* Refactor SplFixedA

Refactor SplFixedArray (#7168)

* Move spl_offset_convert_to_long() to spl_fixedarray.c

It is only used there, which explains its weird offset semantics

* Refactor SplFixedArray offset handling
- Implement warning for resource type
- Throw a proper TypeError instead of a RuntimeException

* Use a proper Error to signal that [] cannot be used with SplFixedArray

* Refactor SplFixedArray has_dimension helper

* Drop some ZPP tests

show more ...

Revision tags: php-7.4.21RC1, php-8.0.8RC1, php-8.1.0alpha1
# 805471e8 08-Jun-2021 Nikita Popov

Fix bug #81112: Implement JsonSerializable for SplFixedArray

This returns an array for SplFixedArray JSON encoding, which
is more appropriate than an object with integer string keys.

Fix bug #81112: Implement JsonSerializable for SplFixedArray

This returns an array for SplFixedArray JSON encoding, which
is more appropriate than an object with integer string keys.

Closes GH-7117.

show more ...

# 9d2a466c 09-Jun-2021 Nikita Popov

Remove explicit assignments of zend_objects_destroy_object

This is the default handler, no need to set it explicitly. This
makes it easier to see which objects really have a custom dtor_

Remove explicit assignments of zend_objects_destroy_object

This is the default handler, no need to set it explicitly. This
makes it easier to see which objects really have a custom dtor_obj.

show more ...

Revision tags: php-8.0.7, php-7.4.20, php-8.0.7RC1, php-7.4.20RC1
# 01b3fc03 06-May-2021 KsaR

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |

show more ...

Revision tags: php-8.0.6, php-7.4.19, php-7.4.18, php-7.3.28, php-8.0.5, php-8.0.5RC1, php-7.4.18RC1, php-8.0.4RC1, php-7.4.17RC1, php-8.0.3, php-7.4.16
# 4f4c031f 18-Feb-2021 Máté Kocsis

Generate ext/spl class entries from stubs

Closes GH-6709

Revision tags: 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
# 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 ...

# aa517858 14-Jan-2021 Nikita Popov

Remove SEPARATE_ARG_IF_REF macro

The name doesn't correspond to what it does at all, and all the
existing usages appear to be unnecessary.

Usage of this macro can be replaced by

Remove SEPARATE_ARG_IF_REF macro

The name doesn't correspond to what it does at all, and all the
existing usages appear to be unnecessary.

Usage of this macro can be replaced by ZVAL_DEREF + Z_TRY_ADDREF_P.

show more ...

Revision tags: php-8.0.1, php-7.4.14, php-7.3.26
# a25886d1 29-Dec-2020 Tyson Andre

Optimize SplFixedArray when magic methods aren't overridden

This decreases the memory usage of SplFixedArrays by 32 bytes per object
on 64-bit systems (use 1 null pointer instead of 5 nu

Optimize SplFixedArray when magic methods aren't overridden

This decreases the memory usage of SplFixedArrays by 32 bytes per object
on 64-bit systems (use 1 null pointer instead of 5 null pointers)
If allocating a lot of arrays of size 1, memory usage was 19.44MiB before this
change, and 16.24MiB after the change.

Existing tests continue to pass.

Subclassing SplFixedArray is already inefficient and rarely done.
It checks for the existence of 5 methods every time a subclass is instantiated.
(and has to switch back from C to the php vm to call those methods)

Closes GH-6552

show more ...

Revision tags: 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
# 3b34d74a 27-Sep-2020 Levi Morrison

Clean up spl_fixedarray.c

Remove inline.
Remove old folding blocks.
Convert an int usage to bool.

Convert some uses of int and size_t into zend_long. This is
incomplete

Clean up spl_fixedarray.c

Remove inline.
Remove old folding blocks.
Convert an int usage to bool.

Convert some uses of int and size_t into zend_long. This is
incomplete because get_gc requires `int *n`, which should probably
become zend_long or size_t eventually.

Adds spl_fixedarray_empty to help enforce invariants.
Adds spl_fixedarray_default_ctor.
Documents some functions.

Reworks spl_fixedarray_copy into two functions:
- spl_fixedarray_copy_ctor
- spl_fixedarray_copy_range

I'm hoping to eventually export SplFixedArray for extensions to
use directly, which is the motivation here.

show more ...

123456789