Nikita Popov
1f4c71b760
Merge branch 'PHP-5.5'
2012-12-21 17:34:14 +01:00
Nikita Popov
14f133036c
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.
2012-12-21 17:28:20 +01:00
Nikita Popov
4509016309
Merge branch 'PHP-5.5'
2012-12-21 01:58:29 +01:00
Nikita Popov
ffb848b275
Fix bug #63822 : Crash when using closures with ArrayAccess
...
op_array->T was used after the closure's op_array was already freed. This just
swaps the freeing order.
2012-12-21 01:56:37 +01:00
Nikita Popov
68730388ae
Merge branch 'PHP-5.5'
2012-12-20 20:36:06 +01:00
Nikita Popov
3e78c6ad25
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.
2012-12-20 20:33:18 +01:00
Nikita Popov
0e781e2309
Merge branch 'PHP-5.5'
2012-12-19 15:23:52 +01:00
Nikita Popov
2768315856
Add missing zend_do_free call
...
This is a followup to d53f1bf8ab
. When the yield *statement* is used its
return value still needs to be freed.
2012-12-19 15:21:34 +01:00
Nikita Popov
5f7c478d53
Merge branch 'PHP-5.5'
2012-12-18 21:41:55 +01:00
Nikita Popov
d53f1bf8ab
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.
2012-12-18 21:39:02 +01:00
Xinchen Hui
210d428f99
ixed bug that exception won't be catched
...
Related failed test Zend/tests/bug35437.phpt (after he latest
execute_data improvement, run with non CALL vm kind)
2012-12-18 15:34:47 +08:00
Xinchen Hui
d3ec9ceb25
Revert "Fixed bug that exception won't be catched"
...
This reverts commit 28db07a0e3
.
Unexpected vm kind change
2012-12-18 15:27:54 +08:00
Xinchen Hui
28db07a0e3
Fixed bug that exception won't be catched
...
related failed test Zend/tests/bug35437.phpt (after he latest
execute_data improvement, run with non CALL vm kind)
2012-12-18 15:20:58 +08:00
Xinchen Hui
72f7543668
Merge branch 'PHP-5.5'
2012-12-14 17:27:21 +08:00
Xinchen Hui
a73a6be764
Fix warning of no return in non-void function
2012-12-14 17:26:42 +08:00
Xinchen Hui
3acc729707
Merge branch 'PHP-5.5'
2012-12-14 17:23:07 +08:00
Xinchen Hui
9fb5cfdeb1
Fixed warning of no return in non-void funciton
2012-12-14 17:21:43 +08:00
Xinchen Hui
359d91a807
Add test for bug #63741
2012-12-14 16:52:56 +08:00
Xinchen Hui
a4678099a1
Add test for bug #63741
2012-12-14 16:51:34 +08:00
Dmitry Stogov
ec4ff07415
Merge branch 'PHP-5.5'
...
* PHP-5.5:
Fixed uninitialized EX(call)->called_scope
2012-12-14 12:11:23 +04:00
Dmitry Stogov
e65b966aac
Fixed uninitialized EX(call)->called_scope
2012-12-14 12:10:29 +04:00
Johannes Schlüter
f8a2407655
Merge branch 'PHP-5.5'
2012-12-13 22:50:55 +01:00
Johannes Schlüter
2098cc7e9d
Merge branch 'PHP-5.4' into PHP-5.5
2012-12-13 22:45:47 +01:00
Johannes Schlüter
ef37055c34
Merge branch 'PHP-5.3' into PHP-5.4
2012-12-13 22:40:23 +01:00
Johannes Schlüter
a11606b18f
Fix Bug #63762 Sigsegv when Exception::$trace is changed by user
2012-12-13 22:39:35 +01:00
Dmitry Stogov
432902a875
Merge branch 'PHP-5.5'
...
* PHP-5.5:
Removed unreachable code
2012-12-13 17:51:41 +04:00
Dmitry Stogov
d5c2da5756
Removed unreachable code
2012-12-13 17:51:04 +04:00
Dmitry Stogov
7dd16bcff4
Merge branch 'PHP-5.5'
...
* PHP-5.5:
Removed unnecessary checks
2012-12-13 17:30:39 +04:00
Dmitry Stogov
438cd86378
Removed unnecessary checks
2012-12-13 17:29:30 +04:00
Dmitry Stogov
cc118f78d7
Merge branch 'PHP-5.5'
...
* PHP-5.5:
Removed redundand checks from release build
2012-12-13 14:47:23 +04:00
Dmitry Stogov
ff1e1d7a8e
Removed redundand checks from release build
2012-12-13 14:46:44 +04:00
Dmitry Stogov
7b84d129d7
Merge branch 'PHP-5.5'
...
* PHP-5.5:
An exception thrown in try or catch block is disacarded by return statement in finally block.
2012-12-13 02:52:23 +04:00
Dmitry Stogov
6b0b4bf8eb
An exception thrown in try or catch block is disacarded by return statement in finally block.
2012-12-13 02:48:51 +04:00
Dmitry Stogov
e7364e14da
Merge branch 'PHP-5.5'
...
* PHP-5.5:
Restored proper generators behaviour in conjunction with "finally". (Nikita)
2012-12-12 17:50:01 +04:00
Dmitry Stogov
9c96fe52d9
Restored proper generators behaviour in conjunction with "finally". (Nikita)
2012-12-12 17:47:55 +04:00
Dmitry Stogov
2025021ed5
Merge branch 'PHP-5.5'
...
* PHP-5.5:
- generators API exported for extensions - improved RETURN sequence to avoid redundant check if op_array is a generator
2012-12-11 17:28:09 +04:00
Dmitry Stogov
a9a5f7aca6
- generators API exported for extensions
...
- improved RETURN sequence to avoid redundant check if op_array is a generator
2012-12-11 17:25:32 +04:00
Xinchen Hui
80e585027e
Merge branch 'PHP-5.5'
2012-12-10 20:31:01 +08:00
Xinchen Hui
70b65f3100
Merge branch 'PHP-5.4' into PHP-5.5
2012-12-10 20:30:39 +08:00
Xinchen Hui
3d86e6d881
Fixed bug #63726 (Memleak with static properties and internal/user classes)
...
No test scripts provided (will try to find one)
2012-12-10 20:29:51 +08:00
Xinchen Hui
ad553a7af2
Fixed bug #63726 (Memleak with static properties and internal/user classes)
2012-12-10 20:28:27 +08:00
Dmitry Stogov
3067f54b27
Merge branch 'PHP-5.5'
...
* PHP-5.5:
Generatirs are going to be used less than regular functions
2012-12-06 13:20:49 +04:00
Dmitry Stogov
e3b2a5cf74
Generatirs are going to be used less than regular functions
2012-12-06 13:14:31 +04:00
Sebastian Bergmann
4f4262e9be
Merge branch 'PHP-5.5'
2012-12-06 09:44:20 +01:00
Sebastian Bergmann
8ca4288fd2
Leftover: Invoke re2c with --no-generation-date to prevent unintentional / unnecessary changes in generated files.
2012-12-06 09:43:27 +01:00
Sebastian Bergmann
6fc2ecaaf2
Merge branch 'PHP-5.5'
2012-12-06 09:30:47 +01:00
Sebastian Bergmann
eab14993fe
Invoke re2c with --no-generation-date to prevent unintentional / unnecessary changes in generated files.
2012-12-06 09:28:35 +01:00
Dmitry Stogov
55e1a9786a
Merge branch 'PHP-5.5'
...
* PHP-5.5:
Fixed comments
2012-12-05 16:03:37 +04:00
Dmitry Stogov
27528b601f
Fixed comments
2012-12-05 16:02:47 +04:00
Dmitry Stogov
77a9b9ac22
Merge branch 'PHP-5.5'
...
* PHP-5.5:
Slight performance improvement
2012-12-05 13:36:28 +04:00