History log of /php-src/Zend/zend_generators.c (Results 1 – 25 of 345)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# c3f5bbde 01-Apr-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Simplify always-true check in zend_generator_update_current (#13848)

`old_root` is dereferenced at top, so `old_root` must not be NULL, and
the check doesn't actually do anything.


# 97267215 10-Jan-2024 David CARLIER

general signatures discrepencies fixes (#13122)


# fc32d39b 08-Apr-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-11028: Heap Buffer Overflow in zval_undefined_cv.

For analysis see https://github.com/php/php-src/issues/11028#issuecomment-1508460440

Closes GH-11083.


# d721dcc2 10-Feb-2023 Arnaud Le Blanc

Fix colletion of unfinished function call in fibers

Fixes GH-10496.

Co-authored-by: Bob Weinand <bobwei9@hotmail.com>


# 00be6e1a 30-Jan-2023 Bob Weinand

Look at executing generator for fiber destructor behaviour


# b9bca2da 30-Jan-2023 Bob Weinand

Fix resetting ZEND_GENERATOR_IN_FIBER flag

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


# 1173c2e6 27-Jan-2023 Arnaud Le Blanc

Prevent dtor of generator in suspended fiber (#10462)

Generators that suspended a fiber should not be dtor because they will be
executed during the fiber dtor.

Fiber dtor throws

Prevent dtor of generator in suspended fiber (#10462)

Generators that suspended a fiber should not be dtor because they will be
executed during the fiber dtor.

Fiber dtor throws an exception in the fiber's context in order to unwind and
execute finally blocks, which will also properly dtor the generator.

Fixes GH-9916

show more ...


# 4fb14939 13-Jan-2023 Arnaud Le Blanc

GC fiber unfinished executions (#9810)


# 5d1f3e04 04-Nov-2022 Arnaud Le Blanc

Fix generator memory leaks when interrupted during argument evaluation (#9756)


# 86e1fea3 14-Oct-2022 Arnaud Le Blanc

Restore extra_named_params when restoring frozen call stack


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


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, php-8.2.0beta2, php-8.1.9, php-8.0.22
# 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 ...


Revision tags: php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1, php-8.0.21, php-8.1.8, php-8.2.0alpha3, php-8.1.8RC1, php-8.2.0alpha2, php-8.0.21RC1, php-8.0.20, php-8.1.7, php-8.2.0alpha1, php-7.4.30, php-8.1.7RC1, php-8.0.20RC1, php-8.1.6, php-8.0.19, php-8.1.6RC1, php-8.0.19RC1, php-8.0.18, php-8.1.5, php-7.4.29
# ceda8a8c 04-Apr-2022 Bob Weinand

Merge branch 'PHP-8.1'


# e0025562 04-Apr-2022 Bob Weinand

Merge branch 'PHP-8.0' into PHP-8.1


# 9cb512ec 04-Apr-2022 Bob Weinand

Ensure correct target opline for exceptions thrown during yield from

Also appends the exception during a yield from values dtor instead of prepending it

Fixing regression introduced

Ensure correct target opline for exceptions thrown during yield from

Also appends the exception during a yield from values dtor instead of prepending it

Fixing regression introduced in 13649451c201361b438ca0f762cfb33dfc3fca39.

show more ...

# 914c1ba1 01-Apr-2022 Bob Weinand

Merge branch 'PHP-8.1'


# 16dceded 01-Apr-2022 Bob Weinand

Merge branch 'PHP-8.0' into PHP-8.1


# 13649451 01-Apr-2022 Bob Weinand

Fix GH-8289: Exceptions thrown within a yielded from iterator are not rethrown into the generator

This also fixes the fact that exception traces were not including the generator frame when t

Fix GH-8289: Exceptions thrown within a yielded from iterator are not rethrown into the generator

This also fixes the fact that exception traces were not including the generator frame when thrown in a yielded from iterator.

show more ...

Revision tags: php-8.1.5RC1, php-8.0.18RC1, php-8.1.4, php-8.0.17, php-8.1.4RC1, php-8.0.17RC1
# 83d96d67 28-Feb-2022 Dmitry Stogov

Merge branch 'PHP-8.1'

* PHP-8.1:
Fix use after free


# ba6bb857 28-Feb-2022 Dmitry Stogov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix use after free


# 01702a85 28-Feb-2022 Dmitry Stogov

Fix use after free

Fixes oss-fuzz #44885

# 90e4d545 18-Feb-2022 Dmitry Stogov

Merge branch 'PHP-8.1'

* PHP-8.1:
Fix memory leak


# 22328f68 18-Feb-2022 Dmitry Stogov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix memory leak


# 84a638a3 18-Feb-2022 Dmitry Stogov

Fix memory leak

Fixes oss-fuzz #44685

Revision tags: php-8.1.3, php-8.0.16, php-7.4.28, 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, php-7.4.27RC1, php-8.1.0, php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6
# 90b7bde6 03-Nov-2021 Dmitry Stogov

Use more compact representation for packed arrays.

- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[

Use more compact representation for packed arrays.

- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[i]
instead of ht->arData[i]
- in addition to general ZEND_HASH_FOREACH_* macros, we introduced similar
familied for packed (ZEND_HASH_PACKED_FORECH_*) and real hashes
(ZEND_HASH_MAP_FOREACH_*)
- introduced an additional family of macros to access elements of array
(packed or real hashes) ZEND_ARRAY_ELEMET_SIZE, ZEND_ARRAY_ELEMET_EX,
ZEND_ARRAY_ELEMET, ZEND_ARRAY_NEXT_ELEMENT, ZEND_ARRAY_PREV_ELEMENT
- zend_hash_minmax() prototype was changed to compare only values

Because of smaller data set, this patch may show performance improvement
on some apps and benchmarks that use packed arrays. (~1% on PHP-Parser)

TODO:
- sapi/phpdbg needs special support for packed arrays (WATCH_ON_BUCKET).
- zend_hash_sort_ex() may require converting packed arrays to hash.

show more ...

12345678910>>...14