History log of /PHP-8.1/Zend/zend_hash.c (Results 1 – 25 of 476)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# af77d3b8 21-Jul-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-11716: cli server crashes on SIGINT when compiled with ZEND_RC_DEBUG=1

Closes GH-11757.


# 8f66b67c 10-May-2023 Ilija Tovilo

Fix compilation for PHP 8.1

Accidentally introduced in 175ff603c3a8ae9dd3e6ccb3fc3081b06263f989. arData was
not part of an anonymous union.


# 975d28e2 10-May-2023 Bob Weinand

Fix GH-11222: foreach by-ref may jump over keys during a rehash

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


# 175ff603 09-May-2023 Amedeo Baragiola

Fix compilation error on old GCC versions

In older versions of GCC (<=4.5) designated initializers would not accept member
names nested inside anonymous structures. Instead, we need to u

Fix compilation error on old GCC versions

In older versions of GCC (<=4.5) designated initializers would not accept member
names nested inside anonymous structures. Instead, we need to use a positional
member wrapped in {}.

Fixes GH-11063
Closes GH-11212

show more ...


# 05bd1423 05-May-2023 Bob Weinand

Fix GH-11189: Exceeding memory limit in zend_hash_do_resize leaves the array in an invalid state

There are more places in zend_hash.c where the resize happened after some values on the HashT

Fix GH-11189: Exceeding memory limit in zend_hash_do_resize leaves the array in an invalid state

There are more places in zend_hash.c where the resize happened after some values on the HashTable struct were set.
I reordered them all, but writing a test for these would rely on the particular amount of bytes allocated at given points in time.

show more ...


# 0f7625c4 13-Jan-2023 Arnaud Le Blanc

Reduce HT_MAX_SIZE to account for the max load factor of 0.5 (#10242)

zend_hash allocates a hash table twice as big as nTableSize
(HT_HASH_SIZE(HT_SIZE_TO_MASK(nTableSize)) == nTableSize

Reduce HT_MAX_SIZE to account for the max load factor of 0.5 (#10242)

zend_hash allocates a hash table twice as big as nTableSize
(HT_HASH_SIZE(HT_SIZE_TO_MASK(nTableSize)) == nTableSize*2), so HT_MAX_SIZE
must be half the max table size or less.

Fixes GH-10240

show more ...


Revision tags: php-8.1.7RC1
# 14fddd17 04-Apr-2022 Dmitry Stogov

Fix arsort() crash on recursion

Fixes oss-fuzz #46315

Revision tags: php-8.1.4RC1, php-8.1.3, php-8.1.2RC1, php-8.1.0
# d0ecc83a 17-Nov-2021 Nikita Popov

Assert hash is known when we claim it is

Revision tags: php-7.3.33, php-7.3.32, php-7.3.31, php-7.3.30
# 67292766 11-Aug-2021 Dmitry Stogov

Eliminate "h < ht->nNumUsed" check in zend_hash_next_index_insert_new()

# ae8647d9 20-Jul-2021 Levi Morrison

Remove leading underscore for _zend_hash_find_known_hash (#7260)

Convert zend_hash_find_ex(..., 1) to zend_hash_find_known_hash(...)
Convert zend_hash_find_ex(..., 0) to zend_hash_find(.

Remove leading underscore for _zend_hash_find_known_hash (#7260)

Convert zend_hash_find_ex(..., 1) to zend_hash_find_known_hash(...)
Convert zend_hash_find_ex(..., 0) to zend_hash_find(...)

Also add serializable changes to UPGRADING.INTERNALS summary

show more ...

Revision tags: php-7.3.29
# aff36587 29-Jun-2021 Patrick Allaert

Fixed some spaces used instead of tabs

# 07da2e3f 26-May-2021 Nikita Popov

Add comment for specialization in zend_hash_real_init_packed_ex()

As the seemingly reundant code may be confusing. Closes GH-6988.

# aca6aefd 14-May-2021 George Peter Banyard

Remove 'register' type qualifier (#6980)

The compiler should be smart enough to optimize this on its own

Revision tags: php-7.3.28
# 462da6e0 31-Mar-2021 Josh Soref

Fix spelling and grammar mistakes

This PR corrects misspellings identified by the check-spelling action.

The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465

Fix spelling and grammar mistakes

This PR corrects misspellings identified by the check-spelling action.

The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465

The action reports that the changes in this PR would make it happy: jsoref@602417c

Closes GH-6822.

show more ...

# e86bea8d 06-Apr-2021 Dmitry Stogov

Extend ZEND_HASH_FILL_* API with ZEND_HASH_FILL_GROW and use it to optimize get_declared_classes()

# 340013ad 19-Mar-2021 Dmitry Stogov

Add zend_hash_lookup() and zend_hash_index_lookup() functions.
Thet search for an element with given key/index and add an empty one (NULL), if no found.

# 89c61186 19-Mar-2021 Dmitry Stogov

micro-optimization

# 26c3fa27 01-Mar-2021 Nikita Popov

Merge branch 'PHP-8.0'

* PHP-8.0:
Always remove HT iterators, even for uninit HT


# 5875bf75 01-Mar-2021 Nikita Popov

Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
Always remove HT iterators, even for uninit HT


# 2c508c4d 01-Mar-2021 Nikita Popov

Always remove HT iterators, even for uninit HT

Fixes oss-fuzz #31423.

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

Revision tags: php-7.3.26, php-7.3.26RC1, php-7.3.25, php-7.3.25RC1, php-7.3.24, php-7.3.24RC1
# 66ecee62 12-Oct-2020 Nikita Popov

Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
Detect self-addition of array more accurately
Deindirect source elements in zend_hash_merge


# 5a7f9afb 12-Oct-2020 Nikita Popov

Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
Detect self-addition of array more accurately
Deindirect source elements in zend_hash_merge


# e304468e 12-Oct-2020 Nikita Popov

Deindirect source elements in zend_hash_merge

If the RHS has INDIRECT elements, we do not those to be added to
the LHS verbatim. As we're using UPDATE_INDIRECT, we might even
create

Deindirect source elements in zend_hash_merge

If the RHS has INDIRECT elements, we do not those to be added to
the LHS verbatim. As we're using UPDATE_INDIRECT, we might even
create a nested INDIRECT that way.

This is a side-quest of oss-fuzz #26245.

show more ...

Revision tags: php-7.3.23
# da0663a3 15-Sep-2020 Nikita Popov

Add GC_TRY_ADDREF macro

That adds a ref if not immutable. Also audit uses of GC_IMMUTABLE
to either use GC_TRY_ADDREF or GC_TRY_PROTECT_RECURSION.

12345678910>>...20