History log of /PHP-7.4/Zend/zend_generators.c (Results 176 – 200 of 241)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: php-5.4.17
# 0f36224b 29-Jun-2013 Nikita Popov

Don't try to clean up generator stack on unclean shutdown

This fixes bugs #65035 and #65161. In one of the bugs the issue is
that function_state.arguments is NULL, but the arg count is p

Don't try to clean up generator stack on unclean shutdown

This fixes bugs #65035 and #65161. In one of the bugs the issue is
that function_state.arguments is NULL, but the arg count is pushed
to the stack and the code tries to free it. In the other bug the
stack of the generator is freed twice, once in generator_close and
later during shutdown.

It's rather hard (if at all possible) to do a proper stack cleanup
on an unclean shutdown, so I'm just disabling it in this case.

show more ...


Revision tags: php-5.5.0, php-5.3.27RC1, php-5.4.17RC1, php-5.5.0RC3, php-5.3.26, php-5.4.16, php-5.5.0RC2, php-5.3.26RC1, php-5.4.16RC1, php-5.5.0RC1, php-5.3.25, php-5.4.15, php-5.3.25RC1, php-5.5.0beta4, php-5.4.15RC1, php-5.4.14, php-5.3.24, php-5.5.0beta3, php-5.3.24RC1, php-5.4.14RC1, php-5.5.0beta2
# 8345abca 25-Mar-2013 Nikita Popov

Remove support for cloning generators


Revision tags: php-5.5.0beta1, php-5.3.23, php-5.4.13, php-5.5.0alpha6, php-5.3.23RC1, php-5.4.13RC1, php-5.3.22, php-5.5.0alpha5, php-5.4.12
# fcc6611d 16-Feb-2013 Nikita Popov

Add support for non-scalar Iterator keys in foreach

RFC: https://wiki.php.net/rfc/foreach-non-scalar-keys


Revision tags: php-5.3.22RC2, php-5.4.12RC2
# 114245c1 01-Feb-2013 Nikita Popov

Fix bug #63830: Segfault on undefined function call in nested generator

This also reverses the destruction order of the pushed arguments to
align with how it is done everywhere else.

Fix bug #63830: Segfault on undefined function call in nested generator

This also reverses the destruction order of the pushed arguments to
align with how it is done everywhere else.

I'm not exactly sure whether this is the right way to fix it, but it
seems to work fine.

show more ...


# 3ee20e45 01-Feb-2013 Nikita Popov

Fix segfault when cloning generator with properties

Rule of thumb: Always implement the object clone handler rather
than the object storage clone handler. Actually I think we should

Fix segfault when cloning generator with properties

Rule of thumb: Always implement the object clone handler rather
than the object storage clone handler. Actually I think we should
drop the latter. It's nearly never usable.

show more ...


Revision tags: php-5.3.22RC1
# 8b972efe 30-Jan-2013 Nikita Popov

Fix potential segfault when finally in a generator is run during shutdown

If a generator is destroyed in a finally block it will resume the generator to run that finally
block before fre

Fix potential segfault when finally in a generator is run during shutdown

If a generator is destroyed in a finally block it will resume the generator to run that finally
block before freeing the generator. This was done in the object storage free handler.

Running user code in the free handler isn't safe though because the free handlers may be run
during request shutdown, already after several key components have been shut down.

This is avoided by doing the finally handling in the dtor handler. These handlers are run at the
start of the shutdown sequence.

show more ...


Revision tags: php-5.4.12RC1, php-5.5.0alpha4, php-5.3.21, php-5.4.11, php-5.5.0alpha3, php-5.3.21RC1, php-5.4.11RC1
# a666285b 01-Jan-2013 Xinchen Hui

Happy New Year


Revision tags: php-5.3.20, php-5.4.10
# be7b0bc3 17-Dec-2012 Nikita Popov

Implement Generator::throw() method

Generator::throw($exception) throws an exception into the generator. The
exception is thrown at the current point of suspension within the generator.

Implement Generator::throw() method

Generator::throw($exception) throws an exception into the generator. The
exception is thrown at the current point of suspension within the generator.
It basically behaves as if the current yield statement were replaced with
a throw statement and the generator subsequently resumed.

show more ...


# 14f13303 21-Dec-2012 Nikita Popov

Fix crash when last yielded value is a closure

If zend_generator_close is called from within zend_generator_resume (e.g.
due to a return statement) then all the EGs will still be using t

Fix crash when last yielded value is a closure

If zend_generator_close is called from within zend_generator_resume (e.g.
due to a return statement) then all the EGs will still be using the values
from the generator. That's why the stack frame has to be the last thing
that is dtored, otherwise some other dtor that is using
EG(current_execute_data) might access the already freed memory segment.
This was the case with the closure dtor.

The fix is to move the dtors for key and value to the start of the handler.
This way the stack frame is the last thing that is freed.

show more ...


# 3e78c6ad 20-Dec-2012 Nikita Popov

Do not add a ref to EX(object) on generator clone

If a ref has to be added it will be already added while walking the call
slots.


# d53f1bf8 18-Dec-2012 Nikita Popov

Fix leak when generator ignores sent value

When the return value of yield wasn't used it was leaked.

This is fixed by using a TMP_VAR return value instead of VAR. TMP_VARs are
a

Fix leak when generator ignores sent value

When the return value of yield wasn't used it was leaked.

This is fixed by using a TMP_VAR return value instead of VAR. TMP_VARs are
automatically freed when they aren't used.

show more ...


Revision tags: php-5.5.0alpha2
# a73a6be7 14-Dec-2012 Xinchen Hui

Fix warning of no return in non-void function


# 9c96fe52 12-Dec-2012 Dmitry Stogov

Restored proper generators behaviour in conjunction with "finally". (Nikita)


# a9a5f7ac 11-Dec-2012 Dmitry Stogov

- generators API exported for extensions
- improved RETURN sequence to avoid redundant check if op_array is a generator


Revision tags: php-5.3.20RC1, php-5.4.10RC1
# 7651d645 04-Dec-2012 Dmitry Stogov

Optimized access to temporary and compiled VM variables


# 5db372fb 30-Nov-2012 Felipe Pena

- Fixed ZTS build


# 70f83f35 30-Nov-2012 Dmitry Stogov

. The VM stacks for passing function arguments and syntaticaly nested calls were merged into a single stack. The stack size needed for op_array execution is calculated at compile time and preallocate

. The VM stacks for passing function arguments and syntaticaly nested calls were merged into a single stack. The stack size needed for op_array execution is calculated at compile time and preallocated at once. As result all the stack push operatins don't require checks for stack overflow any more.
. Generators implementation was improved using the new VM stack. Now it's a bit more clear and faster.

show more ...


# 60871e51 24-Nov-2012 Nikita Popov

Fix bug #63596: finally in generators segfaults

EX(fast_ret) wasn't initialized in this case so the code ended up
dereferencing an invalid pointer after the jump.


# eb4825b5 22-Nov-2012 Dmitry Stogov

Improved "finally" im[plementation


Revision tags: php-5.3.19, php-5.4.9, php-5.5.0alpha1, php-5.3.19RC1, php-5.4.9RC1
# 7bcb8780 04-Nov-2012 Xinchen Hui

Fixed bug #63428 (The behavior of execute() changed)


Revision tags: php-5.3.18, php-5.4.8, php-5.3.18RC1, php-5.4.8RC1
# a31fa55b 22-Sep-2012 Nikita Popov

Fixed bug #63132

EG(arg_types_stack) is now also backed up when generators are used. This
allows the use of yield in nested method calls.

This commit adds two new functions to t

Fixed bug #63132

EG(arg_types_stack) is now also backed up when generators are used. This
allows the use of yield in nested method calls.

This commit adds two new functions to the zend_ptr_stack API:

zend_ptr_stack_push_from_memory
zend_ptr_stack_pop_into_memory

both taking the following arguments:

zend_ptr_stack *stack, int count, void **pointers

show more ...


# a47c11a1 16-Sep-2012 Nikita Popov

Fix two op_array -> function cast warnings


Revision tags: php-5.3.17, php-5.4.7
# 4a7d1b4e 05-Sep-2012 Pierre Joye

- fix build, declarations must be 1st in a contextgit checkout -f master


# 72473962 05-Sep-2012 Dmitry Stogov

Fixed bug #62991 (Segfault with generator and closure)


# dbc7809b 29-Aug-2012 Nikita Popov

Fix typos


12345678910