History log of /php-src/Zend/zend_types.h (Results 1 – 25 of 303)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# b8f10dec 04-Feb-2024 David CARLIER

ZEND_ELEMENT_COUNT usage reduction. (#13324)

clang 18 is going to be released and in the meantime the counted_by
attribute usage had been constrained to true flexible arrays,
typical

ZEND_ELEMENT_COUNT usage reduction. (#13324)

clang 18 is going to be released and in the meantime the counted_by
attribute usage had been constrained to true flexible arrays,
typical cases such as type name[1] ZEND_ELEMENT_COUNT(size) no longer
build.

show more ...


# cc2bf119 13-Nov-2023 David CARLIER

zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic arrays. (#12650)

zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic and flexible arrays.

It is mostly for ubsan and

zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic arrays. (#12650)

zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic and flexible arrays.

It is mostly for ubsan and helping array bound checking.

show more ...


# 45c7e3b0 06-Sep-2023 Máté Kocsis

Fix #12123 Make _ZEND_TYPE_PREFIX apply only for MSVC

Closes GH-12136


# b07a2d47 16-May-2023 Bob Weinand

Address CR comments

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


# cd53ce83 16-May-2023 Bob Weinand

Track HashTableIterators for copy-on-write copies of HashTables

When executing a foreach ($ht as &$ref), foreach calls zend_hash_iterator_pos_ex() on every iteration. If the HashTable contai

Track HashTableIterators for copy-on-write copies of HashTables

When executing a foreach ($ht as &$ref), foreach calls zend_hash_iterator_pos_ex() on every iteration. If the HashTable contained in the $ht variable is not the tracked HashTable, it will reset the position to the internal array pointer of the array currently in $ht.
This behaviour is generally fine, but undesirable for copy-on-write copies of the iterated HashTable. This may trivially occur when the iterated over HashTable is assigned to some variable, then the iterated over variable modified, leading to array separation, changing the HashTable pointer in the variable. Thus foreach happily restarting iteration.
This behaviour (despite existing since PHP 7.0) is considered a bug, if not only for the behaviour being unexpected to the user, also copy-on-write should not have trivially observable side-effects by mere assignment.

The bugfix consists of duplicating HashTableIterators whenever zend_array_dup() is called (the primitive used on array separation).
When a further access to the HashPosition through the HashTableIterators API happens and the HashTable does not match the tracked one, all the duplicates (which are tracked by single linked list) are searched for the wanted HashTable. If found, the HashTableIterator is replaced by the found copy and all other copies are removed.
This ensures that we always end up tracking the correct HashTable.

Fixes GH-11244.

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

show more ...


# 5ad658bc 03-Jul-2023 Ilija Tovilo

Fix type macros for C++

They are now used in arginfo files.


# 53aa53f4 24-Aug-2023 Jakub Zelenka

Introduce Zend guard recursion protection

This PR introduces a new way of recursion protection in JSON, var_dump
and friends. It fixes issue in master for __debugInfo and also improves

Introduce Zend guard recursion protection

This PR introduces a new way of recursion protection in JSON, var_dump
and friends. It fixes issue in master for __debugInfo and also improves
perf for jsonSerializable in some cases. More info can be found in
GH-10020.

Closes GH-11812

show more ...


# 7f1c3bf0 18-Aug-2023 ju1ius

Adds support for DNF types in internal functions and properties (#11969)

Note that this does not add support for items generated by gen_stubs,
only for items registered dynamically via

Adds support for DNF types in internal functions and properties (#11969)

Note that this does not add support for items generated by gen_stubs,
only for items registered dynamically via the Zend API.

Closes GH-10120

show more ...


# cbf67e4f 16-Jul-2023 Arnaud Le Blanc

Remove WeakMap entries whose key is only reachable through the entry value (#10932)


Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23, php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3
# 0b1d750d 11-Aug-2022 Ilija Tovilo

Allow arbitrary expressions in static variable initializer

Closes GH-9301


# 947eb952 24-Apr-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Allow array functions to operate in-place if the refcount is 1 (#11060)

This allows array_merge, array_intersect, array_replace, array_unique
and usort to avoid taking a copy and do the

Allow array functions to operate in-place if the refcount is 1 (#11060)

This allows array_merge, array_intersect, array_replace, array_unique
and usort to avoid taking a copy and do the transformation in-place.

** Safety **

There are some array functions which take a copy of the input
array into a temporary C array for sorting purposes.
(e.g. array_unique, array_diff, and array_intersect do this).
Since we no longer take a copy in all cases, we must check if
it's possible that a value is accessed that was already destroyed.

For array_unique: cmpdata will never be removed so that will never reach
refcount 0. And when something is removed, it is the previous value of
cmpdata, not the one user later. So this seems okay.

For array_intersect: a previous pointer (ptr[0] - 1) is accessed.
But this can't be a destroyed value because the pointer is first moved forward.

For array_diff: it's possible a previous pointer is accessed after
destruction. So we can't optimise this case easily.

show more ...


# 6ebd08bb 12-Apr-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Optimize HT_HASH_RESET (#11059)

Commit d835de19931d added support for AVX2 in hash table initialization
code. The same kind of code also occurs for HT_HASH_RESET. However, this
place

Optimize HT_HASH_RESET (#11059)

Commit d835de19931d added support for AVX2 in hash table initialization
code. The same kind of code also occurs for HT_HASH_RESET. However, this
place was forgotten in that patch. That is unfortunate, because a loop
is just when there may be the most benefit from this SIMD sequence.
Furthermore, the NEON special handling exists in the initialization code
but is also missing from HT_HASH_RESET, so add this as well.

show more ...


# c796ce57 04-Apr-2023 Dmitry Stogov

Re-add GC_DTOR and GC_DTOR_NO_REF


# 706a9b2a 04-Apr-2023 Dmitry Stogov

Revert "Zend/zend_types.h: move `zend_result` to separate header (#10609)"

This reverts commit 3bce11606937de8227dac6512d2abf163dc0e8fa.


# c9d728cb 04-Apr-2023 Dmitry Stogov

Revert "Zend/zend_types.h: move `zend_rc_debug` to `zend_rc_debug.h`"

This reverts commit d6e95041e291f1f41e1da43e616c6354705464d3.


# 0e706937 04-Apr-2023 Dmitry Stogov

Revert "Zend/zend_types.h: move `IS_*` to `zend_type_code.h`"

This reverts commit 0270a1e54c0285fa3c89ee2b0120073ef57ab5fa.


# e2f0ce9e 04-Apr-2023 Dmitry Stogov

Revert "Zend/zend_types.h: move `zend_refcounted` to `zend_refcounted.h`"

This reverts commit eb34c28fed24d0e4711dd4a04c19d0f95dabc5e9.


# 61b19ba3 04-Apr-2023 Dmitry Stogov

Revert "Zend/zend_types.h: move `zend_uchar.h` to `zend_char.h`"

This reverts commit 42577c6b6b7577c57c161ee4a74cb193382bf1e0.


# ac3abe45 04-Apr-2023 Dmitry Stogov

Revert "Zend/zend_types.h: move `zend_string` to `zend_string.h`"

This reverts commit 02690fe3c0c35655bc40844780eba0c283a37a2f.


# 3bcf2c37 28-Feb-2023 Máté Kocsis

Allow readonly properties to be reinitialized once during cloning (#10389)

RFC: https://wiki.php.net/rfc/readonly_amendments


# 02690fe3 13-Jan-2023 Max Kellermann

Zend/zend_types.h: move `zend_string` to `zend_string.h`

It is now possible to include only `zend_string.h` without
`zend_types.h`.


# 42577c6b 13-Jan-2023 Max Kellermann

Zend/zend_types.h: move `zend_uchar.h` to `zend_char.h`

Prepare to fix the cyclic header dependency from `zend_string.h`.


# eb34c28f 13-Jan-2023 Max Kellermann

Zend/zend_types.h: move `zend_refcounted` to `zend_refcounted.h`

This is necessary for splitting `zend_types.h` further.


# 0270a1e5 21-Feb-2023 Max Kellermann

Zend/zend_types.h: move `IS_*` to `zend_type_code.h`

More decoupling of circular header dependencies.


# d6e95041 13-Jan-2023 Max Kellermann

Zend/zend_types.h: move `zend_rc_debug` to `zend_rc_debug.h`

`zend_rc_debug` is not a type and does not really belong in
`zend_types.h`; this allows using `ZEND_RC_MOD_CHECK()` without

Zend/zend_types.h: move `zend_rc_debug` to `zend_rc_debug.h`

`zend_rc_debug` is not a type and does not really belong in
`zend_types.h`; this allows using `ZEND_RC_MOD_CHECK()` without
including the huge `zend_types.h` header and allows decoupling
circular header dependencies.

show more ...


12345678910>>...13