History log of /PHP-8.1/Zend/zend_generators.c (Results 276 – 300 of 336)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
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

# bef79588 29-Aug-2012 Nikita Popov

Fix segfault when traversing a by-ref generator twice

If you try to traverse an already closed generator an exception will now be
thrown.

Furthermore this changes the error for

Fix segfault when traversing a by-ref generator twice

If you try to traverse an already closed generator an exception will now be
thrown.

Furthermore this changes the error for traversing a by-val generator by-ref
from an E_ERROR to an Exception.

show more ...

# cc07038f 29-Aug-2012 Nikita Popov

Make sure that exception is thrown on rewind() after closing too

Revision tags: php-5.4.7RC1
# f53225a9 25-Aug-2012 Nikita Popov

Fix several issues and allow rewind only at/before first yield

* Trying to resume a generator while it is already running now throws a
fatal error.
* Trying to use yield in fina

Fix several issues and allow rewind only at/before first yield

* Trying to resume a generator while it is already running now throws a
fatal error.
* Trying to use yield in finally while the generator is being force-closed
(by GC) throws a fatal error.
* Rewinding after the first yield now throws an Exception

show more ...

# 4d8edda3 24-Aug-2012 Nikita Popov

Run finally if generator is closed before finishing

# f45a0f31 20-Aug-2012 Nikita Popov

Disallow serialization and unserialization

1...<<11121314