|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-12-16 08:21 UTC] laruence@php.net
[2015-12-16 09:08 UTC] Bernhard dot Liebl at rz dot uni-regensburg dot de
[2015-12-16 10:38 UTC] nikic@php.net
-Package: PHP Language Specification
+Package: Scripting Engine problem
[2015-12-16 15:08 UTC] laruence@php.net
[2015-12-16 21:49 UTC] stas@php.net
[2015-12-16 21:49 UTC] stas@php.net
-Status: Open
+Status: Verified
[2015-12-18 07:40 UTC] laruence@php.net
-Assigned To:
+Assigned To: laruence
[2015-12-18 07:40 UTC] laruence@php.net
[2017-01-02 14:23 UTC] nikic@php.net
-Status: Verified
+Status: Closed
[2017-01-02 14:23 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 01:00:01 2025 UTC |
Description: ------------ Throwing an exception from a generator under certain conditions produces a segfault. Happens with php 5.5.9 and php 5.6.16. Seems to be fixed with php 7. Test script: --------------- <?php $a = function() { try { yield 1; } finally { throw new Exception(); } }; $b = function() { yield 1; }; echo "starting " . phpversion() . "\n"; try { foreach ($a() as $x) { foreach ($b() as $y) { return true; } } } catch (Exception $e) { echo "caught exception.\n"; } echo "exit.\n"; Expected result: ---------------- starting 7.0.0 caught exception. exit. Actual result: -------------- OUTPUT: starting 5.6.16 COREDUMPS THEN BACKTRACE: Program received signal SIGSEGV, Segmentation fault. 0x000000000070d359 in gc_zval_possible_root () (gdb) bt #0 0x000000000070d359 in gc_zval_possible_root () #1 0x000000000079b287 in ?? () #2 0x0000000000717e28 in execute_ex () #3 0x00000000006ddf89 in dtrace_execute_ex () #4 0x00000000006efa10 in zend_execute_scripts () #5 0x000000000068f845 in php_execute_script () #6 0x00000000007a00ce in ?? () #7 0x0000000000461d90 in main ()