Created attachment 844832 [details] Sample script Description of problem: apache dies with SEGV in php script doing chained assignment in an object method. Version-Release number of selected component (if applicable): php-5.5.7-1.fc20.x86_64 How reproducible: reproducible Steps to Reproduce: 1. Put the attached php file in a directory that apache can fine 2. Point your browser to the script 3. Actual results: Apache dies with [Thu Jan 02 22:39:03.503911 2014] [core:notice] [pid 9839] AH00052: child pid 9850 exit signal Segmentation fault (11) Expected results: It should run Additional info: In the Controller::run method, the chained assignment is where it dies. Specifically, it seems like chaining to a list() is the critical component. I can change list($a) = $b = $c; to $b = $c; list($a) = $b; and it works fine, Additionally, if I run it from the php command line, it doesn't fail but assigns an incorrect value to $a.
list($a) = $value; only work is $value is an array. so list($a)=1; => don't work list($a)=[1]; => works. See: http://php.net/manual/en/function.list.php
Even if the syntax is badly used, php should not segfault. I cannot reproduce any segfault with the provided example (php 5.5.8RC1). (display "r" which is the first element of the string considered as an array) It seems it could have be fixed in 5.5.8, with the fix for bug #66041 related to list(). I'll keep this bug open until 5.5.8 is released (next week) Please confirm that the bug is fixed or still present.
Created attachment 844980 [details] Correct version of test script
I uploaded the wrong sample script and am adding the correct one. The rhs to list() is indeed an array. Please note that the SEGV seems to be related to the chained assignment being run inside a class member function and the intermediate result being assigned to a class member variable.
Created attachment 844981 [details] Sample script version 3 Put everything in test case back to normal.
Ok, with this test script I can reproduce the segfault, with PHP 5.5.7. Using PHP 5.5.8RC1, no more segfault. So this will be fixed with next week update.
php-5.5.8-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/php-5.5.8-1.fc20
php-5.5.8-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/php-5.5.8-1.fc19
Package php-5.5.8-1.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing php-5.5.8-1.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-0581/php-5.5.8-1.fc19 then log in and leave karma (feedback).
Tested with php-5.5.8-1.fc20 and my test case and real code (HTML_QuickForm_Controller from pear) both work correctly.
Thanks for the feedback (you can also add karma to the update)
php-5.5.8-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
php-5.5.8-1.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.